Because FUCK living that close to other people. Humans fucking suck to be close to and I'd go fucking postal having to deal with that shit.
I hate my neighbors as it is and barely see them. If I could hear their shithead kids screaming and throwing themselves into the walls I'd burn down a city block.
Modem building codes usually have noise separation requirements.
You have to remember that people who advocate for apartments usually aren't trying to make everyone live there, they're just trying to make apartments/condos an option for who those who want them. In much of the US and Canada it's illegal to build medium and high density housing, for essentially no reason beyond aesthetics and racism.
See that's all fine and well. More people should do that. But then you get the people who don't want to live near people, in the middle of a city. The "have your cake and eat it too" kind. And that's just not feasible.
There really is no one-size solution to housing. We need, and all benefit, from having some degree of options, but importantly, those options should be attainable, and all have their costs/drawbacks.
Consider that if you have one bad neighbour in an apartment, then everyone on your floor will also be talking to them and helping to regulate their disruptive behaviour.
Apartments usually have concrete walls so you can't hear your neighbours. Unfortunately, there are some new builds made by developers trying to maximise profit at the expense of the residents who don't do this.