The simple flaw in your argument is that you assume that these things are usually mutually exclusive. In fact, it is typically the opposite; they usually are one in the same. The things that are "best" for society also tend to make the most money. People pay for things because they want (or need [2])them, because it makes their lives better [1]. To extend this to investments, smart investments are investments to companies who will eventually make money, because their products are worth buying.
Investing money is an incredibly rewarding but very risky activity. Smart investments will make upwards of 100x ROI, bad ones will lose every penny. Having smart investors is an imperative to maximizing the usefulness of money. Just look at Solyndra ;)
1. since people are having trouble understanding how to interpret this sentence let me clarify. "Better" is completely subjective. For the purpose of making buying decisions, "better" is whatever the person making this buying decision defines as "better" for them. All in all the point of "better" not really being "better" is irrelevant (as it the distinction between want and need). If you want to make the argument that investors are investing in companies that actually make our lives worse, then the solution is typically banning those companies and products directly, not banning investments to those companies.
2. thanks to /u/revscat (yes I know this is not reddit)