Allow me to supplement these excellent answers with an anecdote describing the tarrasque's legendary status, followed by an analysis of the logistics of tarrasque hunting.
The origin of the tarrasque's reputation
Back in D&D 3.5, a friend and I decided to pit the tarrasque against the highest challenge rating creature in the Monster Manual: the CR 27 great wyrm gold dragon. The tarrasque in this edition was only challenge rating 20, limited to a base speed of 20 feet, and unable to fly. I assumed that the dragon would win easily.
I was wrong. The tarrasque's carapace in that edition gave it immunity to the dragon's breath weapon, as well as to rays (including disintegrate). Not that it mattered, because the tarrasque was also immune to fire—and a lot of magical effects, including poison, energy drain, ability score loss, and even magic missile.
This forced the dragon to attempt melee combat. The tarrasque had damage reduction 15/epic: in D&D 5e's terms, it ignored the first 15 damage per hit unless you had an artifact-level weapon. Then it had regeneration 40, so it healed 40 damage every round. You had to roll a considerable amount of damage just to keep its hit points from increasing.
To quote the Monster Manual, "No form of attack deals lethal damage to the tarrasque."
We ran the numbers on the tarrasque's damage output versus the gold dragon's. In a straight-up melee battle, the tarrasque would murder the dragon by a safe margin. Hit-and-run attacks were not possible. The tarrasque would heal to full hitpoints if given a break of two minutes.
Eventually, the gold dragon won by turning the tarrasque to stone with magic, one of the few types of attack it was not immune to. Even so, its spell resistance gave the dragon a 55% chance for the spell to fail outright, and even then the tarrasque had to fail its saving throw, to which it had such a high bonus that it needed to roll a natural 1 to fail. It was an absolute fluke.
No human army in this edition could harm the tarrasque. Arrows could not deal enough to penetrate its damage reduction, let alone overcome its phenomenal regeneration. It dealt out six attacks per round, with base damage sufficient to kill the average man, and no ordinary warrior could even hit the tarrasque's armor class except on a natural 20.
Dragon Magazine #359 even increased the tarrasque to CR 30. That issue noted the tarrasque's legendary status, but admitted that it is not the most powerful:
The tarrasque is widely held as the toughest monster in Dungeons & Dragons, despite their being creatures in the Monster Manual of higher CRs, not to mention dozens of other deadlier beasts in other books.
The logistics of tarrasque hunting
In D&D 5th edition, the tarrasque inherits the reputation of its earlier version, even if it's not so invulnerable. Still, its D&D 5th edition incarnation remains a being of immense ferocity.
Against adventurers, it deals honest melee damage, which is difficult to be immune to. It has +19 to hit, in an edition where a high-level character's armor class may well be around 20. And if we trust the designers, it's challenge rating 30—balanced for 30th level characters in an edition where player characters cannot advance beyond 20th level.
Against normal armies, who are not often equipped with magic items, it is almost entirely invulnerable. In theory it will fall to some 150 magical arrow hits, but this is still not trivial.
Should it use all its legendary actions to run, it can move up to 100 feet per round. Even if a flying archer can keep up, they make a DC 17 Wisdom save or be frightened for 1 minute, which means they have disadvantage on their attacks and can't move toward it, which means they can't follow it as it flees. They can try to stay out of range (120 feet), but a longbow's short range is 150 feet, and that's within the tarrasque's movement speed.
In other words, a great many of the flying archers will still be shooting at disadvantage against an AC 25 target. Even a moderately talented archer may only have a +5 or +6 bonus to hit. That means only a 5% to 10% hit chance, and if that's with disadvantage, it's a 1/400 or 1/100 chance to hit. That means to hit with 150 magical arrows, you need to actually fire more like 15,000 arrows.
The fly spell only lasts up to 10 minutes, and only grants a fly speed of 60 feet. You need a lot of wizards (or one powerful wizard) just to grant flight to a small squad of archers. Then there's the logistics of this. How do we know the tarrasque will be near the archer squads, or where do we station the squad? What about the risk to the wizards, who must be relatively close to the tarrasque?
So now the problem goes beyond simply hiring twenty elite archers and twenty brave fifth level wizards. Each archer will, at best, have 10 minutes or 100 rounds in the air, in practice less because they will have to get to and from the tarrasque. You would need a minimum of 150 elite flying archers to put out enough damage to kill the tarrasque in a single encounter. In practice, due to getting to and from the tarrasque, archers being out of range and so on, you're looking at maybe 300 archers and some 200 to 300 high level wizards.
There may not be enough brave wizards in the entire kingdom to pull this off.
And even if you can, the tarrasque can flee at 100 feet per round. Your three hundred elite archers can only fly 60 feet per second. The longbow's maximum range is 600 feet, and that's you firing at disadvantage, and that's if you can manage the logistics of bringing an army to bear in the time and place where the tarrasque chooses to strike.
Meanwhile, the tarrasque just levelled half of Baldur's Gate. A local archmage tried to kill it with a disintegrate spell, but it deflected off the beast's hide and the mage was eaten in one gulp. From the perspective of the ordinary folk, it really is the most dreaded creature.