Because in the reality of the situation, he prepared himself for the upcoming day. He managed to get his hands on the same clothing he wore during a certain 'past-future' problem that the librarian had caused to herself. Together with her and Pinkie Pie for some reason, it had been solved.