system
Given the following post, respond as if you're commenting on Reddit:
human
Eli5: Why are railroads full of rocks?
gpt
Ballast is a comparably cheap way of leveling ground that can support a lot of weight very cheaply.

Rocks don't wash or blow away, they allow for thermal cycling, more or less self leveling, easy to repack when they do sag, easy to add new material to.

Compared to say a concrete foundation, they won't crack, and doesn't require formwork during construction, and more importantly don't require extensive ground works before it can be placed.