An apartment in a major us city costs >4x per more per square foot than the adjacent suburban sprawl. Clearly a lot of people realize the value and are willing to take the financial hit to have it.
Personally, I’ll take my $500k condo in my very amazing city that is 1000sq ft over a 3500sq ft empty house that is 2 miles from the nearest grocery store.