I want to add to what chris_mc and others said confirming this horrible instance is used as a training exercise for lots of the US military.
When I did USMC boot camp in the late 2000s this and other less publicized examples were used to enforce disobeying unlawful orders and encouraging critical thought.
To quote a West Wing episode (AFAIK): "All wars are crimes." I'm glad we try to do better by teaching from our mistakes.