The money you spend to buy a stock does not go to the company issuing it (with exception of the IPO), so you're not really helping them in any way.
(Same as if you’re against killing animals and buy used leather. You support people who want to sell used stuff and, thus, indirectly producers of leather.)