First job out of college, I was at a consulting firm doing software development for DHS (Homeland Security). I got a lot of flack from my friends and family for "working for the devil", but the work was actually objectively good for society - basically there was a big data problem where when an immigrant trying to illegally cross into the US was apprehended, and if they were sick, their custody would be transferred from US Customs and Border Protection (CBP) to Health and Human Services (HHS) so they could receive medical attention. There was zero data transparency between these two orgs, so when that transfer happened it usually caused families to be separated (Sick dad, healthy mom and child, sick dad gets brought in for care and never finds his family again). Since HHS and CBP don't have data communication and everything is siloed, the handoff was really poor and they often wouldn't find each other for months afterwards.
There was a lot of talk about this in the news, and although the software I was working on didn't entirely fix the problem, it allowed the agencies to communicate better. Their data wasn't siloed, and families got separated for only a few days rather than (sometimes) permanently.
I really miss that job. The pay was atrocious and zero WLB, but everyone agreed it was an important problem to solve, and I think the tool we had built really was helping.