Why did trench warfare last so long?
Trench warfare, by its very nature, is static. There is no opportunity for maneuver that would result in a decisive, conflict ending victory or series of victories. Further, new weapons like machine guns and big barreled artillery favored the defensive. That is, it made more sense to sit in your trench, wait for the other side to attack and then slaughter them with your machine guns and artillery. Remember that trench warfare was present ONLY on the Western Front. On the Eastern Front (Germany v. Russia) there were far fewer troops and much more space, making entrenchment a bad idea. Free to maneuver, the Germans inflicted a devistating defeat on Russia, which led almost directly to the Russian Revolution and the rise of the Soviet Union. Germany never got the chance to enjoy the fruits of that victory because winning in the East was followed within a year by ultimate defeat in the West.