Would caves in general be practical lairs for a dragon?
So, I was writing an outline for the battle between a dragon and a bunch of humans. However, a key component of the humans' battle plan was to place a hidden stash of ballistae near the entrance when the dragon was away. Then, raid it during the night, corner the beast in his own cave, and pepper him with poisoned ballista bolts while meekly hoping that St. George's paladin skills are strong enough to withstand dragon fire.
But there's the problem. Why would a dragon choose a place where their main selling point (insane mobility via flight) can't work? I mean, we don't play by Hollywood rules. When a dragon sees they're in big trouble they won't hesitate to do the legendary maneuver, the "Fly you fools!" "Nigerundayo, Smokey!"
Sure, dragons need quite a bit of space, but there must be other places they can sleep in besides caves, right?
So why caves?
To be more concrete, the aforementioned plan relied on the cave having only one entrance. Just how common is that? Because if a large majority of caves are like that, where many openings are too small for a dragon (a creature slightly larger than a horse), then it's not worth it. There's also the humidity (some of the dragon's hoard is sensitive to that), temperature (not too hot, not too cold), general safety (i.e: the roof won't fall on your head when sleeping), and accessibility. Dragons like to fly (even more so than swimming) but it is a last resort.
So, would caves be a good lair for a dragon, if yes, then why?