The fact that is used to make profit doesn't absolve us from any moral judgement. Buying stocks of a company improves its financial position allowing it to grow.
Would you buy stocks of ClusterBombsInc over CureForCancerInc because it has slightly better prospects?