By buying it. Even the land-grant railroads bought the land, in the form of carrying the US mail at reduced rates for the next 80 years. (During World War 2, when the government was desperate for money, they let the railroads buy themselves out of the reduced mail rates. So it worked out to payments for 80 years with a balloon payment at the end.)
Things get complicated with a common good like land. It's not particularly just that just because someone purchased some natural resource a hundred years ago people who weren't even born at the time are screwed. Presumably every generation should have a say in how society operates.