It's why many brilliant minds appear to be quite content working for unethical tech giants, advertising or surveillance companies.
The reason why the company exists doesn't matter to them.
What the company actually does outside of their computer doesn't matter to them.
The technology and their freedom to pursue the New does. Companies love the production and enthusiasm they provide and pay well for it.
(Usually these types of developers do have a conscience and it's often taken up, used and displayed in worthwhile and benevolent corporate friendly style social activism)