Let's rephrase then: why does owning stock imply financially supporting the company? After IPO, you're not buying anything from the company, you're buying from other investors.
Not only that, but your goal as a shareholder is to benefit financially from the company. If a company is a bad actor and you know it, you are expressly financing and benefitting from bad acts. I’m not sure why other commenters are trying to abstract this fact out of existence. It is not rocket science!
So if you buy stolen goods from someone who bought the stolen goods from the thief, and you knew the goods were stolen, you are doing nothing unethical. That’s all you’re saying, which is a position you can have, but it is a sad one. And you are, in fact, contributing to bad acts. The initial buyer may not have bought the investment if they knew there wasn’t a rube down the line that would take it off their hands.
I think you do endorse the company whose shares you hold, in particular if it’s public knowledge.