Adam Hochschild, whose To End All Wars, is a must read about WW I and the opposition to it, points to the wrong lessons taken by military men from wrongful colonial wars, and the results displayed in the carnage of WW I.
… those who marched proudly into battle in 1914 [thought] that they would be shooting at the enemy, but that he would not be shooting back, or at least not effectively. How else to explain that most soldiers on both sides had no metal helmets? And that millions of French infantrymen, as well as the Austro-Hungarian cavalry, wore combat uniforms of brilliant red and blue? As the war began, troops from both sides advanced over open ground en masse, as if they were not facing repeating rifles and machine guns: bayonet charges by the French, and ranks of young Germans walking, arms linked, toward astonished British soldiers.
… the men who led Europe into the First World War found it more comforting to look … at battles where victory was swift and the enemy had little firepower. In 1914 Europe had not had a major war in more than 40 years and, except for the Russians, almost all officers who had actually seen combat had done so in lopsided colonial wars in Africa and Asia.
… The Europeans were so enraptured by the power the machine gun gave them over colonial rebels that they never bothered to plan seriously for facing the weapon themselves.