I'm happy with the work I do—I find it rewarding personally and the inkling of a possibility that it might be useful one day for any number of biological applications is exciting.
Unfortunately, I am entirely replaceable, compensation is meh for the level of education, and society as a whole does not place much value in basic sciences so career prospects are bleak (and this was BEFORE the current administration).
Yes, I think it's okay to enjoy whatever it is you enjoy so long as doing so doesn't harm others or yourself. I also think it's important to be mindful what it is that makes you feel like there's a moral quandary, and it's also worth considering if the media you're consuming is the work of a group of people or a single individual.
For example, I really enjoy the movie Chinatown, but Roman Polanski is a piece of shit. I don't think his shitness diminishes the quality of the movie because it was acted well by Jack Nicholson and Faye Dunaway; the writing is incredible as is the cinematography; and credit where credit is due, Polanski directed the movie masterfully. He's still a child rapist piece of shit though.