Like, I’m aware of there being exceptions like Penguins, Ostriches, and Bats. But in general, why is there such a distinct land/air split between mammals and birds? Why don’t mammals share the ground with ecosystems of plant- and meat-eating walking birds? Why didn’t we get birds that evolved to slither like snakes, or tunnel like rodents? Why isn’t it (land+sky) all just mammals, where we’d have parrot- and vulture-like bats that don’t lay eggs? If we started the simulation again, might things like this evolve?
There’s a lot of good answers here but there’s some missing things as well.
To start with, there was a separate category of flying dinosaur, those with ‘fingers’. They could climb trees, grasp things, etc. They were large and heavy. The heaviness was due to the increased weight that these joints added, including in their legs. When disaster struck, the lighter dinosaurs (descendants of today’s Aves) were able to escape the disaster due to reduced energy usage, snapper energy requirements, etc. The heavier ones were not.
Second, there are a lot of categories that birds fall into. Like others have said, birds in isolation eventually revert to flightlessness. It’s advantageous.
I’m not sure why you think mammals/birds are the dividing line either. There are many animals that “fly” that aren’t birds (bugs, bats), and there are many mammals that aren’t on land as well (whales, bats, etc).
I feel like your question is maybe more a question of “why are mammals so dominant” which probably comes down to many differences in avian biology, adaptations that explicitly make life easier in the sky vs land. Better usage of oxygen, ability to lay eggs out of reach of predators, explicit bone structure for flying. Flightless birds have lost many of these things. Mammals have other adaptations that make life easier for them on land. Trying to cross this boundary usually results in disaster for the evolutionary line and so it doesn’t happen.
This is a good all-round answer. Thanks