Elon Musk is an exception to the general rule. He's an eccentric billionaire who is also a kind of techno-idealist and he doesn't necessarily mind spending some of his money for what he deems to be the public good.
But you didn't frame your statement in terms of Musk. You made a more general comment. In general, private enterprise is concerned with very little other than profit, so private enterprise will only solve problems in the general public interest when there happens to be a convergence of public interest and profit motive, which isn't all that often.
Thats not really true either. To be fair, I grew up in the Bay Area of CA, so companies often did charity.