Have you ever run in a marathon? It is a race with a distance of 26.219 miles, usually on a road.
I haven't! I didn't actually know a marathon was over 26 miles even though I know a lot of people who have run in one. Is that why they have to be on a road?
They don't have to be, but they would be much harder if they weren't. The Marathon was instituted in commemoration of the fabled Battle of Marathon in Athens.