obviously in the fiction there must be some or other reason that the PCs are surprised. Gygax realised this, and addressed it in his DMG (p 62):
When one side or another is surprised, this general term can represent a number of possible circumstances. In the first place it simply represents actual surprise - that is, the opponent was unprepared for the appearance/attack. The reason for this could be eating, sleeping, waste elimination, attention elsewhere, no weapon ready, etc. While each possible cause of surprise could be detailed, with a matrix and factors of time for recovery from the condition calculated to a nicety, the overall result would not materially add to the game - in fact, the undue complication would detract from the smooth flow of play.
The tone of this passage is very similar to the passages that explain and justify hit points and saving throws. And that's no surprise: what all those passages try and do is to explain and justify departures from purely representational mechanics of the "mechanical simulationist" variety discussed by Eero Tuovinen (two decades earlier Edwards called this purist-for-system simulationism).