This is a story, told from the protagonists's viewpoint (Matthew Modine as "Joker"), of his recruit training at Parris Island (USMC) and his deployment to Viet Nam during the war. The movie is split pretty evenly between boot camp and Viet Nam.
R. Lee Ermey plays the drill instructor (D.I.) of the platoon and is everything you've imagined in your nightmnares about basic training in the Marines. As the platoon moves through its training, one of the recruits Vincent D'Onofrio ("Leonard") does an excellent turn as the overweight, dumbass who is constantly getting "special attention" from the D.I.
The night before the recruits are to graduate from boot camp, Joker is on fire-watch and finds Leonard in the head with a loaded rifle in his hands. Leonard has obviously flipped-out and when the D.I. finds the recruits in the head and attempts to get the rifle away from Leonard, Leonard shoots the D.I. and then blows the back of his head off right in front of Joker.
Flash to Viet Nam. Joker is now a reporter with Stars and Stripes and is teamed up with RafterMan a photographer. They are stationed at Da Nang, and are involved in the big Tet offensive which almost overran South Viet Nam.
Joker and RafterMan head out into "the shit" and eventually link up with Cowboy, a friend of Joker's from basic training. They stay with that platoon and get into assaults on some population centers/cities. Cowboy is killed by a sniper, and Joker joins the rest of the squad in ferreting out the sniper - who turns out to be a woman.
Joker finds the sniper in a building, and when he tries to shoot her, his rifle jams. RafterMan comes along and shoots the sniper. She doesn't die right away, and the squad forms a circle around her body as she begs them to kill her. Joker reluctantly does.
The squad then rejoins their unit and are last seen marching off to what will most likely be yet another battle.
Answer: It was Gustav Hasford's idea. It happened in the original book that the story is based on, "The Short Timers."
Captain Defenestrator