This one's a stumper. Actually, the solution isn't as simple as "Twilight deduced there would be no visit, therefore any visit would be a surprise", because that assumes Twilight's logic was correct, and we're being told to explain the flaw in it. The reason is because this creates a paradox.
Imagine Celestia failed to show up Monday to Thursday. Twilight waits for Celestia...and now one of two things could happen. If she was visited on that Friday, then it would mean Celestia's statement about it being a surprise is untrue. Or if she never showed up, it means the part about visiting is a lie.
It's a paradox because they can't BOTH be true.
Twilight's entire chain of logic breaks down at the very last day. Any result then would be self-contradictory, so any logic drawn from them is utterly pointless.
But as long as it doesn't actually GET to Friday, Princess Celestia's statement still holds true. She just needs to visit Twilight by Thursday.
Funny thing though? Nopony could ever agree unanimously what the actual flaw in the logic is. This is just one interpretation Celestia ran with, knowing Twilight so well. Looks like there is still much to learn about being a Princess of Friendship yet!
That's not necessarily true. All the statement assumes is that Twilight believes her logic, and since Twilight now belives Celestia won't show up, she has no reason to be expecting her on Thursday morning.
Besides, the statement only explains why she was surprised, not what's wrong with her logic. Her logic hinges on the fact that she believes Celestia is coming, and that Celestia does come. Since she no longer believes Celestia is coming, her logic no longer applies.
Everything else works.