Paths of Glory

The film begins with a voiceover describing the trench warfare situation of World War I up to 1916. In a chÃ¢teau, General Georges Broulard (Adolphe Menjou), a member of the French General Staff, asks his subordinate, the ambitious General Mireau (George Macready), to send his division on a suicide mission to take a well-defended German position called the "Anthill." Mireau initially refuses, citing the impossibility of success and the danger to his beloved soldiers, but when Broulard mentions a potential promotion, Mireau quickly convinces himself the attack will succeed.
Mireau proceeds to walk through the trenches, asking several soldiers, "Ready to kill more Germans?" He throws a disturbed private (Fred Bell) out of the regiment for showing signs of shell shock, which Mireau considers simple cowardice. Mireau leaves the detailed planning of the attack to the 701st Regimentâs Colonel Dax (Kirk Douglas), despite Dax's protests that the only result of the attack will be to weaken the French Army with heavy losses for no benefit.
During a nighttime scouting mission prior to the attack, a drunken lieutenant named Roget (Wayne Morris) sends one of his two men ahead as a scout. Overcome by fear while waiting for the scout's return, he lobs a grenade and retreats. The other soldierâCorporal Paris (Ralph Meeker)âfinds the body of the scout, killed by the grenade. Having safely returned, he confronts Roget, but Roget denies any wrongdoing, and falsifies his report to Colonel Dax.
The next morning, the attack on the Anthill proceeds. Dax leads the first wave of soldiers over the top into no man's land under heavy fire, but the attack is a failure. None of the men reach the German trenches, and B Company refuse to leave their own trench after sustaining heavy casualties. Mireau, enraged, orders his artillery to open fire on them to force them onto the battlefield. The artillery commander refuses to fire on his own men without written confirmation of the order. Meanwhile, Dax returns to the trenches, and tries to rally B Company to join the battle, but as he climbs out of the trench, the body of a dead French soldier knocks him down.
To deflect blame for the failure, Mireau decides to court martial 100 of the soldiers for cowardice. Broulard convinces him to reduce the number to three, one from each company. Corporal Paris is chosen because his commanding officer, Roget, wishes to keep him from testifying about his actions in the scouting mission. Private Ferol (Timothy Carey) is picked by his commanding officer because he is a "social undesirable." The last man, Private Arnaud (Joe Turkel), is chosen randomly by lot, despite having been cited for bravery twice previously.
Dax, who was a criminal defense lawyer in civilian life, volunteers to defend the men at their court-martial. The trial, however, is a farce. Dax protests the lack of a stenographic record, the lack of a formal written indictment, and the court's refusal to admit evidence that would support acquittal. In his closing statement, Dax challenges the court's authenticity, and requests mercy, saying, "Gentlemen of the court, to find these men guilty would be a crime to haunt each of you till the day you die." Nonetheless, the three men are sentenced to death.
Captain Rousseau (John Stein), the artillery commander who had earlier refused Mireau's order to fire on his own men, arrives to tell Dax about the incident. Dax confronts Broulard as he is attending a ball with sworn statements by the witnesses attesting to Mireau's order to shell his own trenches, and tries to blackmail the General Staff into sparing his men. Broulard takes the statements but brusquely dismisses Dax.
The next morning, the three condemned men are led out into a courtyard, among soldiers from all three companies and senior officers. Arnaud, injured during a desperate outburst in prison, is carried out on a stretcher and tied to the execution post. A sobbing Ferol is blindfolded. Paris is offered a blindfold by Roget, but refuses. Roget, whom Dax has forced to lead the executions, meekly apologizes to Paris for what he has done, eliciting an ambiguous response. All three men are then shot and killed by the firing squad.
Following the execution, Broulard has breakfast with the gloating Mireau. Dax enters, invited by Broulard. Broulard then reveals that Mireau will be investigated for the order to fire on his own men. Mireau leaves angrily, protesting that he has been made a scapegoat. Broulard then blithely offers Mireau's command to Dax, assuming that Dax's attempts to stop the executions were a ploy to gain Mireau's job. Discovering that Dax is in fact sincere, Broulard angrily rebukes him for his idealism while a disgusted Dax calls Broulard a "degenerate, sadistic old man."
After the execution, some of Dax's soldiers are raucously partying at an inn. Their mood shifts as they listen to a captive German girl (Christiane Harlan, later Kubrick) sing a sentimental folk song. They are unaware that orders have come for them to return to the front. Dax lets the men enjoy a few minutes while his face hardens as he returns to his quarters.

Question: Why does Mireau order his artillery to open fire on a french trench?
Answer: Because  B Company refused to leave their own trench after sustaining heavy casualties.