Nobody actually knows the Earth isn't a real planet.
Since the building of the Earth, the Magratheans had long ago gone into their self-imposed deep sleep and had faded into myth and legend. Most people in this enlightened age don't even believe that they exist, except for highly gullible people like Zaphod Beeblebrox.
As such, the purpose of the Earth has no doubt been long since forgotten, and as it looks like a planet, and moves like a planet, and acts like a planet, it might as well be a planet for all practical purposes, which makes it fair game for hitchers of all persuasions.
A fair question at this point would be, why didn't the mice construct some kind of shield to keep people out? The answer of course being that the only thing that sort of thing would accomplish would be to make people that much more determined to get in to see what all the fuss was about. And that would rather defeat the purpose entirely. Plus, that sort of thing would require a tremendous amount of power to keep going for ten million years, and who do you think wants to be responsible for that electric bill?