Amen. As a DM it is completely fine to generate challenging "food for thought" situations for their players, but when you start to play against your party and actively sabotage their characters, decisions or playstyle, it's time to step down as a DM.
The issue with this kind of thing is almost never the actual challenge or moral dilemma, wherever and however it may spring up - it's usually about trying to narratively 'pants' a character with a poorly contrived But Thou Must or Sophie's Choice, and the most generous interpretation of that action is that the GM feels that the suffering of a PC will help tell a good story. I find more often that these scenarios pop up in Humiliation Conga campaigns, where the GM just gets a kick out of creating worlds and encounters that primarily serve to inflict pain and misery on the PCs, and sometimes even the players themselves. And that's not to say that those kinds of stories and settings can't work or be enjoyable (Paranoia and the character-focused 40K games like Rogue Trader come to mind) but it has to be the kind of story that everyone at the table wants to tell.
“I’ve seen this once before when I was a rookie officer. This tiefling broke in and hung pictures of himself and his family all over the walls. Let’s sprinkle some stolen gold on him and get outta here.”
Had a similar experience once at a convention. The DM was somehow obsessed with "winning" the scenario, as if it was a player party VS. the DM situation. He even was suprised when most of us flat out left the table after we managed to defeat the first major threat of the campaign and it then somehow suddenly turned into an undead version of itself, stood up again and managed to escape for no discernible reason other than the DM being unwilling to "lose" the fight.
On the flip side, we had a blast continuing the scenario in the partking lot on our own terms, without a DM.
Long story short; not a common problem, but IF it happens, it is frustrating and annoying and can ruin the fun of the entire party.