Not to make money? Is that true in the US? London UK does just that. In toto, the London Councils (2018-2019) took in more than 700 million pounds and spent around 270 million running the service.
Yes, they're there to solve a problem not related to government revenue. Some cities use them as a revenue generator and they're examples of the effects of perverse incentives.