Often in these cases they didn’t. The government imminent domained the property and let the houses and occupants stay. There are some Indian tribes that own city property that offer 99 year leases. You ‘own’ the house, but not the land (Palm Springs CA being the most notable).
I read of a place in Florida where people paid ground rent and put trailers on the property.
The owner sold the land and many of these trailers where more expensive top move than they were worth so they just left them there.
I guess I am a nut , but before I bought my home I had a title search to be sure I would own the land, I also made sure there were no codicils in the neighborhood.
I realize of course that all of us are at the mercy of a Government out of control that can do most anything it likes. American is no longer the land of the free if indeed it ever was.