Right now, this is a service being provided largely by volunteers, with some help from donors. For example, the lemmy.world instance is run by the same person as mastodon.world, who has posted some information here about the costs and donations involved in running Fediverse services.
As it turns out, it's not super expensive to run a public-facing Internet service with a few thousand users if you're interested in doing so as a hobby activity. And a lot of folks are willing to donate to help the project along!
More generally: Over the history of the Internet, new services have often been prototyped by researchers, students, and hobbyist volunteers. These folks are expecting to spend a little money to make the service work, and usually enjoy it when people using the thing they've built! They usually don't have an immediate need to monetize everything, but they often accept donations if you're enjoying their work and want to contribute that way.