In the book Tomorrow, and Tomorrow, and Tomorrow by Gabrielle Zevin, the main character Sadie is a video game designer who created his game in which you play a worker creating factory parts. If you ignore what's going on around you and just focus on winning the game by making the parts better and faster, eventually the game ends and it becomes clear that you were creating equipment for Nazis during the Holocaust and, thus, you lose the game.
Movies love to have twist endings in which something would have been obvious if you were paying better attention. I think more video games need to do this as well.
I heard of an art / board game like this as well, loading trains with as much cargo as possible. Once you get to the end of the game you discover what the cargo was.