Why?
The government may wish to
- provide a service that pays for itself only indirectly in the long run like investing in its citizenry and their well being.
- price a service below cost to enable the citizens who most need the service to actually benefit from it
- serve the entire citizenry not just those profitable to serve
What these have in common is that they represent a transfer of value from those who have more to society as a whole. This is pretty much how every decent functional society in existence works at scale.
Virtually nothing the government does "pays for itself" because economic systems while useful are so bizarrely insufficient by themselves that I'm not sure I have words to express it. They suffer from insufficient information, outright corruption and outright failure to encode most of what is most worthwhile in dollars, cents, and incentives.
Those who believe in capitalism alone seem to be appealing to some bizarre pure state of nature that has never existed will never exist. Meanwhile ignoring the fact that everything about capitalism as practiced anywhere on Earth is a wholly artificial mashup of perverse incentives, short time thinking, rules, regulations, and customs based in part of what can be exploited, in part on what people think is right, and in part on what people think is useful.
Given that capitalism is as artificial construct as opposed to some ideal state its easy to argue that we the people ought to use our political power transfer wealth from the haves to increase the health and well being of society as a whole.
Because of this government options will often be aligned with what society as a whole can afford and will benefit from in the long run as opposed to what those directly benefiting right now can support out of pocket.