Nicotine being generally available could have provided significant amounts of social benefits by allowing people to self-medicate. Current healthcare systems are absolutely not adequate for picking up the slack and that's if the healthcare system is even willing to treat those people (ADHD treatment in some European countries is tricky).
While it was certainly bad how much cigarettes were pushed and I do think this caused more harm than good, it still probably had benefits.
My own opinion is that profits and social value have become mostly misaligned a few decades ago already.
I know that last one is controversial in the US, but I'm a Brit and a conservative voting one at that, and over here and in Europe generally it really isn't at any significant level.
Some enterprises, particularly general social services and infrastructure just work very well as charitable trusts, or non profits. This has been shown to be effective for hundreds of years. Then for-profit enterprises can work alongside them to mutual benefit, such as medical products companies working along with health services. It's just a matter of which model works best in practice in a function, ideology be hanged.
As we're on the subject of SpaceX the NASA model worked very well for a while, but ran into the ground with the Shuttle. Now we seem to be back with a productive synergistic relationship between public and private functions.
There's been plenty of failures of profit seeking as a social good that may have been avoided if companies felt a duty to society beyond profit seeking.