Your quitting should not be a surprise to your manager.
Just like year-end review (for those companies that have it) should not be a surprise to the employee - feedback should be continuous. Similarly, if your (rational, to another posters point) manager's reaction is one of complete shock and surprise, it may be a sign you two weren't communicating sufficiently and planned/discussed your goals/expectations/challenges/direction/etc.