One of the things about most game worlds that troubles me is the sheer number of monsters. At what point does even trying to conceive of an ecology in which they all fit become ludicrous? How many is too many?
The thing to keep in mind is that monster books get published in order to sell them. In most cases, it is in fact ludicrous to assume that all the monsters in the monster book - much less a dozen or so books - are species, that they fit in an ecology, and so forth. And yes, it is entirely reasonable to pare down the book to just those monsters that fit the world of your imagination. The reason I tend to not buy monster manuals is that on average, I'd only use maybe 5% of the monsters in the book. That makes monster books terribly bad investments in terms of pages referenced per dollar. I really wish that I could by monsters at like $0.10 a page, rather than books of them.
The biggest problem with reconciling monster books with an ecology is that 99% of the monsters in the book are large top order predators. In the real world, we've got basicly cat, dogs, bears, sharks, whales, and cephalopods. We've got a handfull of highly similar species in each group, with only a handful of those breaking into the 200 lb+ class. Then we've got some smaller predators - weasels, raptors, etc. and their minor variants. If we really assumed all the monsters existed as species, then we'd have hundreds of variant types much less species. Think for example of all the sorts of Dragons that have been published. If those are all species of dragons, how are there more than a handful of each in the whole world? How if they are widely distributed at all do they manage to find mates? In my experience with world building, adult dragons so rarely appear on the map that any two of them are probably hundreds of miles a part. For this reason, I basically keep the large true dragons restricted to the 5 main species rather than assume all 60 or more published dragon variaties actually exist in the world.
But there is an even bigger problem with having that many sorts of monsters, and that is that it dillutes the mythological power of the monster. You can't give interesting backstories in a cosmology or give each monster meaningful mythological roles when you've got thousands of types of monsters. At some point all that diversity just serves to dillute and water down the setting.
There are a number of solutions in my opinion.
1) Return monsters to their roots: One thing you'll notice about D&D is that it tends to take something like The Minotaur or Medusa, and transform them from being the monsterous results of some sort of curse and the central character in what might be considered a sort of horror story, and turns them into mundane species - minotaurs, medusas, etc. Sometimes that might be warranted, but one option is to assume that most of the monsters in published monster manuals are basically unique beings. As unique beings, they are unique and don't have an ecological role per se. They will however acquire a narrative role, since each now has a story (or can be given a story) in your campaign as to how they came about. Many types of monsters are well suited to this. The greater sorts of undead are well suited to being the results of a unique curse. Constructs are well suited to being the results of a unique creation. Outsiders and fey are well suited to being unique individuals rather than members of a race. Aberations are well suited to being the results of unique magical events. Rather than relying on monster manuals, I tend to prefer to make unique variants of existing monster types. It's really easy to mix and match powers, add templates, change hit dice or appearance, add or alter spell-like abilities and use the same monster for an almost infinite variaty. When your monsters are unique and don't have an easily recallable stat block associated with them, they'll feel scarier to your players.
2) Focus on your favorites: I would strongly suggest if you were worldbuilding to pick out your favorite kinds of monsters and use them as your primary pallette. There is no need to assume that everything in a monster manual or all monster manuals reflects the diversity in your world, or even that what the MM's says about the stock D&D setting is true of your world. Figure out what you will use and assume that anything not in that list represents basically unique monsters or at most a small band found in only one place in the world as the result of some unique circumstance. When I set down as a junior high DM with the intention of creating my own setting, one of the first things I decided was that there were no orcs. Why? Because I didn't think I needed two races of ugly humanoids and I thought goblinkind was just cooler and more interesting. It was a good choice, and its paid dividends I didn't imagine at the time. Often quality is better than quantity.
3) Stay out of the food chain: One way to justify a large variaty of monsters is make the focus of your monster variaty those sorts of monsters that aren't part of the ecology. Undead, outsiders, constructs, elementals, and fey don't necessarily have normal caloric needs. Many of them are spirits that can live in parallel to a normal ecology, coming out only at night, or at certain times of the year, or 'when the stars are right' and the rest of the time being quiescent. The normal ecology of your world can be tight and believable, only you have in addition this supernatural and magical realm adjacent to and overlapping your world. This creates a nice fairy tale feel, and is one 'style' if you will.
4) Make a new food chain: One possibility is to get rid of the lions, tigers, and bears and assume that the fantastic beasts of the monster manual are the normal ecology of your world. This creates a really nice alien feel, but is a bit more work to build, maintain and describe since both you and your players loose all references to normality. In addition to a new ecology, you'll probably need new assumptions about animal husbandry, mounted warfare, heraldry, and iconic symbolism. One of the reasons fantasy normally retains bears, wolves, eagles, boars, cats, rats, and so forth is that these animals have symbolic, narrative, and mythological value as well as roles in an ecology. Think about even how the spells are named 'Bull's Strength', 'Eagle's Splendor', 'Fox Cunning' and so forth. You'll need to adapt monsters into this iconic roles, and it can take awhile for everyone to accept and believe in the new narrative.
5) Star Wars Cantina: Another possibility is to go ahead and make the diversity a trope of your setting, by providing some sort of explanation for it. Maybe your world is a crossroads of the multiverse, and is home to visitors and immigrants from many worlds (this was explicitly the case in the Tekumal setting). Maybe you are running a Planescape like setting. In the dungeons and dragons cartoon, the Star Wars like diversity is explained by the fact that the world is literally a Dungeon World, where beings from other worlds have become trapped (Perhaps at one time before the Realm was corrupted by Venger, many of the inhabitants are descended from beings exiled from their homes for crimes real or invented. Perhaps others are descended from the former gaurds.) It wasn't just the kids that wanted to go home. Whatever your explanation, diversity is an acceptable choice IF you actually take the time to explain it in your world's backstory.