Why do enemies in Sokoban spawn so close / are so strong?

Solution 1:

This problem is a combination of 2 things - that Sokoban is quite a small, closed in level (hence your surprise Ant problem) and that Hill Orcs always spawn in a big group. Beyond this, Sokoban itself isn't notable.

Solution 2:

Much like Ft Ludios, Mime's End, the Big Room, etc., Sokoban is a "bonus" challenge level that is not meant to be easy due to the density of guaranteed items (not to mention all the random items that accompany the monsters) in such a small area. You have to earn those items.

Also, each level of Sokoban has at least one threshold that triggers monster generation (if you have ESP and a means of blinding yourself, you'll see that the rooms you are trying to get to start out almost empty and fill as you near your goal). It's usually about the third-to-last hole.

And, if you are like me, sometimes I get a bit tired of the repetition and go on autopilot (forgetting how many moves I'm actually making). Time is a factor in when monsters get generated on any level. Perhaps the surprise comes from that. This game is notorious for killing the inattentive.