If you view your work through a lens of pure abstraction and intellectual curiosity, what's to stop you from working on something that hurts people, just because the problems are interesting?
There are dark sides to every industry, for example when does a game cross the line into being a Skinner box? I don’t think it’s as simple as industry A unalloyed good, industry B unmitigated evil.
A company is not either "good" or "evil"; it's not binary, there's no evil bit in corporate ethos. Some companies are more evil than others, and to pretend everything slots into either "good" or "evil" and all "evil" companies are equivalent is an act of cowardice. Working for IBM during the Holocaust is not comparable to working at Zynga during the peak of Farmville. It is dishonest to look at your own life from a standpoint of pure rationalism and reject your own humanity, your own human experience, and how your actions affect other people's lives.
It would depend on that person’s moral preferences and perceived value of benefits/drawbacks a company offers. Your “harm” might be someone else’s “good” (see: other person in this thread condemning games).