Googling phrases like 'leasehold legal history' etc will get you lots of articles, with many contradictory bits of info - I looked into it for days when I was househunting!
Basically, the concept of a leaseholds dates back to medieval times when the landed aristocracy granted leases to their tenants to live on and work the land, without owning it. It gave them control over what happened on their estates plus a means of raising money from their tenants when needed.
At various times over the centuries landowners and developers have used this arrangement to their benefit to profit off tenants. At other times there have been legal interventions to limit their power and protect tenants.
Hopefully I've been vague enough to not be totally wrong, honestly, you'd have to go back to primary literature to be totally sure of the details because all the articles online say contradictory things about what exactly happened when (before about the 1920s anyway - and even that period is confusing as a layperson. Basically the law has been honed over centuries).
As for what freeholders today get from continuing to own the land without collecting rent - I guess charging people for renewing the lease esp if they leave it to the last minute, maybe the chance of collecting rent in the future, and the chance of ownership of the property reverting back to them should the lease not be renewed? I'm assuming it's mostly a case of why would I give it up if I don't have to. It's MY land. Or something.
FWIW the flat I ended up in, each flat in the building owns an equal share of the freehold (technically the freeholder is a company, and we own that company). So it's a framework for enforcing payment of maintenance etc but there isn't 'rent' going to some landowner somewhere. And other countries have other ways of managing shared buildings that don't rely on the leasehold concepts. Of course in reality with however many existing leaseholds plus how tangled it is legally it's not that simple to be like 'let's just scrap it'!