In the opening bit of pretty much every version of Hitchhiker's Guide to the Galaxy, the Earth is destroyed to make room for a hyper-spatial express route. Is there any basis for why this would need to be done, or is this purely a plot device to give a plausible reason to destroy the earth?
The Hitchhiker's Guide is absurdist literature (or whatever the word is for a radio program), it's not supposed to make sense at that level. It's not hard SF. Hyperspace bypasses don't even come up in any other occasion — after all spaceships seem to be able to travel through hyperspace without bypasses.
The original (out-of-story) reason, as apparent in the first episode, is to give a motivation for Arthur Dent to leave earth. In grand comedic style, he's going to leave earth because it's going to be demolished. And not for any serious reason either, just to build a motorway (a hyperspace one, of course, because it's SF). For better comedic effect, Arthur just happens to be trying to prevent the destruction of his own house for the very same reason.
Now later, we do learn that there was an in-story reason to destroy Earth, revealed in episode 9 (of the original 12) or book 2 (The Restaurant at the End of the Universe). The bypass was only a pretext:
The destruction of Earth was commandeered by psychiatrists. Earth was about to find the the Ultimate Question, which would have put psychiatrists out of work.
And there's a probable reason for that, in turn (hinted at but not canonically confirmed).
“There is a theory which states that if ever anyone discovers exactly what the universe is for and why it is here it will instantly disappear and be replaced by something even more bizarrely inexplicable. There is another theory which states that this has already happened.” (mentioned by the narrator in opening sequence of episode 7 or book 2; then Prak mentions it to Arthur in book 3) According to this theory, the Earth could not find the Question and had to be destroyed in a bizarrely inexplicable manner.
Same as in
"What do you mean, why's it got to be built? It's a bypass. You've got to build bypasses."
Other than comedic reasons, I don't think there's much of reasonable explanation given to us. It's just not possible to go around, so the house/planet (ie. "individual") must go if the "higher order" (government) wants it done.
Just to add to Gilles' excellent answer, posted as a separate answer because you can't do spoiler-protection in comments:
Episode 12 adds the extra revelation that, according to the Ruler of the Universe, "a man called Zaphod Beeblebrox is president, but he is in financial collusion with a consortium of high-powered psychiatrists who want him to order the destruction of a planet called Earth because of some sort of question..."
It's a matter of absurdly upscaling an extant trope: the bulldozing of a home for a highway bypass is the origin trope; upscaling it big enough to delete a planet is one of those upscale to the absurd.
In a word, Absurdity. It's not intended to be sensible once thought about (especially since, later in the same volume, there's the diatribe on "Space is Big"...).
That said, it works almost on a Con-job level... it sounds plausible at first, provides a nifty excuse to delete the Earth and get Arthur off of it. (Ford, likewise, but Ford is not relevant for this trope.)