Magnus did this intentionally
Magnus has been playing this tournament for more than decade now , he managed to follow all the rules for all this time , but this specific mistake happened when he was (1) almost out of contention from the 1st spot after a bad day one (2) has been involved in a rift with fide about the freestyle thing (3) for people saying he didn't have enough time to change , there was a difference of slightly more than a hour between the rounds when he was Asked, hotels are 6 min away from the playing hall (4) everybody knew the dress code beforehand and infact some of the rules were suggested by top players.