There are 100 reasons that long rests should be restricted to specific locations, and on long rest, minor enemies should re-spawn.
Mainly, you can’t exploit it. It gates player progress in a logical manner for scripting purposes, it builds immersion instead of breaking it.
I always wondered where all those mobs I just killed came from in a respawn system. I mean, are there limitless numbers of mobs hanging out in a dungeon? How do they feed that population?
It's also really easy to exploit, just not the way you're thinking. Clear a couple of rooms, do a long rest, clear those rooms again, do a long rest, etc. etc. That is, essentially, how dungeons in MMOs work, after all, at least, in MMOs where they aren't instanced. In MMOs where they are, the vast majority of MMOs that I've played don't have respawns in the dungeon.
Welcome to the lovely world of diminished returns, CR EXP gain gating or exponential difficulty. Consecutive resting in an area can lead to increasingly difficult encounters and areas can be easily modelled to have extremely unforgiving and taxing encounters that are not worth farming without returning to town and trekking back the whole way again. This system existed in older games and was barely worth exploiting to push yourself a few thousand EXP for a level and this was extremely situational and reduced to being useless at higher levels.
I am here to discuss a video game. Please do not try to rope me into anything other than that. Thank you.