When I reviewed B3 Palace of the Silver Princess the other day, I highlighted the random monster selection that plagues it. Monsters in rooms they have no reason to be in, monsters generally appearing once per type in the dungeon seemingly to get them all in, etc. Not a lot of sense.
You can explain some of it - there is a curse, some of these could have wandered in, etc. But that you can explain it doesn't really help hold it together sufficiently for my purposes.
I explained why we goofed on the Castle of the Mad Archmage even as we enjoyed it a while back. Again, it was the seeming randomness.
The fights could be fun, the monsters tricky, and the puzzles challenging, but without anything to hang them together it felt flat to me.
I think the reason is clues, logic, and reasoning.
If there is some kind of logic to the adventure, and there are clues of what's ahead (even if subtle, or which require experimentation to find), then you can use your reasoning. You can leverage what you've seen in the past and what you see in front of you to make smart play decisions.
So in B3 you can explain that every monster there is because of Arik and Chaos, and so it should be disordered. But when you hit sensible encounters with a good explanation - folks trapped in the castle, ghosts, Chaos-distorted plants run amok, cultists, guardian statures, rats running loose in the halls, etc. - it makes the ones that don't - beetles in secret rooms, troglodytes just standing around in one room, etc. stand out all the more.
Once you start feeling the logic of the place, and see the clues of what's to come, you can use your reasoning to guess ahead. Sometimes you'll be right. Sometimes you'll be wildly wrong. You'll really be taken off-guard by things that fit but that you didn't plan for or couldn't plan for.
But if there is too much that has no logic, no clues, and is just there for the sake of being there ("Hey, we didn't put in a crab spider, put one in somewhere") then you're back to just guessing. Opening a door is just seeing what's randomly in there. You can't make informed choices because the person who laid out the dungeon didn't. You can't discern a pattern, only make one up on the fly, because it's only a pattern in retrospect. You can't use your player skill and careful play to help out because anything could be behind that door, whether it could have gotten there in the first place or not.
Randomness can still be fun - I still want to take Mirado down into the depths of the Castle of the Mad Archmage again - but when any given move is like clicking any given number in Dungeon Robber, the only choice I'm making is to spin the roulette wheel or not. And that wears on me even it randomly keeps dropping on fun things to do.
As a practical takeaway, I would say this - make sure there is some hint of what's to come. Make sure there is something that holds it together. Make sure the players can correctly guess ahead or see the patterns, if they're paying attention and put their minds to work. If it's all just random you're going to lose some engagement from which good play and good fun can spring.