This is the famous photo of General Nguyễn Ngọc Loan executing Captain Nguyễn Văn Lém of the Viet Cong.
Lém was in civilian clothes, despite being an armed solider. This arguably makes him a spy, for which there is a long history of summary executions.
Now don't get me wrong. I still think he shouldn't have been summarily executed. He should at least have been given a quick military trial. But it does make you understand better why he was executed – because he was not in uniform, and had slaughtered a family.