I mean in the sense that if there's a morally distasteful business choice, but corporate officers pursue it, then are sued, a solid defense is claiming fiduciary duty. To wit, they thought it would make the company money.
Generally I’m not aware of any civil claim that would let shareholders sue over bad morals.
The claim in the suit is notably that the company failed to disclose the behavior, not that they did the behavior (Target notwithstanding), which mostly agrees with your line of questioning.