I'm early 30s and still like the city, though that's still fairly young I suppose. I agree there are some lifestyle choices involved, though. I like outdoor space myself, but I don't personally feel a need for it to be my own private yard. It's more important to me to be near large parks, waterfront spaces, nice plazas, etc.
I'd say it's a fairly common preference here (Copenhagen) even for families, although some do prefer single-family homes with private yards. One difference in the urban architecture vs. NYC is that in the nicer neighborhoods, apartment buildings often have sizable private courtyards: the buildings are built on the edges of a large block, with a park left in the middle. That park may have playground equipment, BBQ equipment and picnic tables, etc., for the use of residents (also, off-street bike parking). I don't use it a lot, but families seem to.
Some of the buildings have quite active local communities as well, which some people like: dinner clubs where people will take turns hosting a dinner party (in the courtyard when it's nice, otherwise in an apartment), your kids can play with other kids in the building, you can leave them playing in the courtyard and someone else will watch them if you need to go somewhere briefly, etc.
I grew up in a suburb myself (about an hour outside of Chicago), and it was okay all around. But I think I might've preferred something a bit denser. One downside I recall is that everything was so far that someone below driving age ends up being very hampered in movement. I would have to bike 15-20 minutes just to get the houses of some friends who lived in what was considered my neighborhood. And many of my friends weren't reachable at all without adult assistance.