Parks in the city tend to be focused on art. They often lack kid basics like swings and sand. They tend to be too small for a ball game. Often the people who are there will yell at kids for running off the path, yelling and the other ways kids play.
Bars and clubs are not kid friendly places. Middle age folks are much less interested. If you are middle aged and hang out in a bar you are an alcoholic. Clubs often have an minimum age, so going means an expensive babysitter. (bars might allow kids to eat there).
Theater is similar to bars - kids might not be banned, but they are not really welcome either. Both because the shows are not what kids would be interested in, and because they will kick out the kids if they are noisy (which they will be - not kid friendly shows).
Restaurants will allow kids, but often you get dirty looks for bring kids. Many of the others do not like kids and will let you know if your kids are misbehaving - what they define as misbehaving is normal for kids.
Then we add in costs - all of the above is affordable when it is just 1 or two adults, but with kids it is either a lot more expensive to bring this with or you hire a babysitter. You also need larger apartments - most are 1 or 2 bedrooms, but a family wants at least 3 and likely more. You can buy a house in the suburbs with 4 bedrooms and other extra rooms for less than the month payment on a city apartment.
Last there are schools which tend to be bad quality. I've concluded that this because of the other factors above - few families live there and so not enough people care to make them good. It does however stop many families that might want to try living in the city.