Monsters spawn more frequently, and in higher numbers in dark spaces inside a rather small world border (10-20 or so).
This is most likely because monsters, unable to spawn or dying quickly outside the limits, only manage to spawn and survive within the walls.
This causes many problems in surival/survival challenges where you can be hoarded by about 20 or 30 different monster inside a a small cave room, making clearing it nearly impossible without dying, changing to peaceful, or clearing with commands.
Comments 2
This is an inherent part of spawning physics. If there are less mobs spawning in certain places there are more spawning elsewhere. I've seen mob farms built on creative in the middle of the ocean up on a pillar so that it's just open air for a certain distance around the farm. Therefore the farm is the only place anything could spawn and it gets 10 times the numbers.
The only way around it would be to program the cap on the max number of monsters to shrink when the world border is below a certain size. But I think there are many players who would prefer it "broken" like this. Expect a insanely small world border to cause a big monster challenge. Try using the following cheats:
/gamerule keepInventory true
to make it so you don't drop anything when you die. You also don't lose experience (because that would be dropping xporbs).
/gamerule mobGriefing false
to make it so that creeper explosions don't damage terrain.
Then you can afford to keep rushing the same target location over and over.
Can't confirm if a bug or intended.