Yep, if the creature has a stat block, it's designed so that a DM can put it in front of the players and have them have a chance of defeating it.
Honestly, saying dragons are super special snowflakes makes about as much sense as sparkly emo vampires. Killing dragons is entrenched in mythical lore. It's what noble knights do when they're rescuing princesses from towers of improbable provenance. If you're running Dungeons and Dragons without the opportunity to go kill a dragon, you're literally missing 50% of the title.
Are dragons tough? Sure. But by 10th level, so are players. An average Fighter could kill every person in a small town single-handedly without breaking a sweat. An average Rogue could sneak into the king's throne room and steal the crown off his head. An average Cleric can literally raise the dead back to life and pop over to heaven to have a direct chat with his deity.
And a Wizard?
They upholster their tower's lounge suite in dragon leather.
The game's for the players, not the DM. It's a DM's job to tell a good story and throw tough but fair fights at the players to overcome. The players are supposed to be the stars of the show, and if their idea of a good time is slaying dragons, let 'em do it, I say. If they're clever they'll come up with a valid strategy that works for them. Of course, that might annoy greater, more powerful dragons in turn, so they'd best be ready to face the consequences of their actions too. But it comes back to the old adage, If It Has Stats, We Can Kill It.
It's why Paizo don't publish stats for their major deities. Cthulhu has stats, demon lords and so forth, but good luck finding a stat block for someone like Asmodeus. If they did, it'd be open season on the Dark Prince. If you want an unkillable dragon, I'd suggest Tiamat. Or possibly Dahak.