In some cases, people will pay you for making things that help them hurt or exploit other people. It could be argued that this constitutes making the world a worse place.
For example, you could get paid by criminals to make ransomware or by an ad company to flood users with ads or by a cryptocurrency company for building tools that facilitate money laundering and tax evasion or by a government to create a database of dissidents and protesters or by a toy company to use ML to generate fake reviews...