We always hear about how most people just after the outbreak of World War I thought that the war was going to be over very quickly, from the generals down to the privates to the civilians. How could they be so blind? These countries had built up huge militaries and supplied them with the deadliest weapons known to man in huge numbers. It seems obvious to us that those factors combine to create a very long war of attrition. What was their thinking?
During the Franco Prussian war the Germans were able to mobilize and deploy a lot of troops within a short amount of time. This kinda changed the face of war and the perception of war, with railroads and sophisticated mobilization systems. 40 years later the improvements in transportation and military structure let people believe that wars from now on will see a faster victory. The stronger force will march over the weaker enemy and achieve a decisive victory. At this point people didn't knew how the next war will look like. While trenches and artillery were not new the combination of these tactics with heavy machine guns created what we today know as trench warfare. Before the war people expected a war of 1871esqe outcome.
It should be noted that the view wasn't really naive, the Germans came "pretty" close to achieving an early victory while having to split their forces between west and east. In World War 2 Operations were often decisive and pretty short in duration compared to wars pre 20th century. Poland fell in 2 weeks, France in 6.
The western front in world war 1 was more the exception than the rule people were not so wrong with their perception that industrial wars between major powers will be rather short. 1915 at the western front militaries just didn't figure out how to overcome the the technological changes which highly favored the defense.
It should be mentioned that a few more far-sighted people predicted a longer war. Von Moltke, the eternal pessimist, glumly believed that the war would last years, and the Kaiser (though a very mercurial fellow) said much the same thing when the British got involved. He had earlier told assembled troops that they "... would be home before the leaves fell from the trees."
On the side of the Entente, Lord Kitchener was essentially alone in believing that the war would last a long time. He urged the Cabinet not to squander the entire BEF in the opening stage of the war, and wanted it to stay home as the nucleus of a larger army that he wished to build. Kitchener wanted an army of at least 3 million, which he predicted would take three years. However, he was very much an outsider in this belief.
Source: Barbara Tuchmann's The Guns of August
Because in their minds these "deadliest weapons known to man" would only act as force multipliers w.r.t. increasing offensive capacity with contemporary tactics. The Machine Gun was seen as a way to drastically increase the firepower of a company and increase its offensive potential and in many ways it was. Artillery, which was stupidly powerful at this point, was seen as a way to obliterate defensive positions and forts and basically force a war of movement. I should also note that both of these were completely true and would describe exactly how it would play out.
In the first month of the war it was a full war of movement. The Germans would absolutely crush through dozens of Belgian and French forts like they were paper mache and just keep on marching. Fortifications as they were traditionally known, even when supported by trenches, were completely useless. Within less than 40 days Germany would take significant gains and come quite close to winning if not for some critical mistakes on their part and daring moves on the French's part.
What you need to understand is that trench warfare as we know it was technically the exception and not the rule as someone else has said. The Eastern Front, while having trenches, did not have a complex and permanent trench system and maintained a 'movement' based war throughout the conflict. Same goes for the African and Mid-Eastern fronts. However as we all know the Western Front was arguably the most central to the war effort so we need to understand why it happened there and not elsewhere.
Well after the German 1st and 2nd Armies were almost completely surrounded and crushed the entire German "hammer" was sent reeling back toward Belgium. As the Germans fell back they had the luxury of choosing the best defensive positions they wanted. Basically, they were willing to give up a few extra kilometers in some spaces if it meant getting advantageous terrain. They would dig in in these places and make it illogical to attack when you could just go North and outflank them. So both sides, at the same time, begin "racing to the sea" as it's called to try and outflank the other while they fought battles along the way (as you'll see in the above picture) finally concluding at the very end of October.
The reason a "race to the sea" could not happen in the East for instance was it just too damn big. This was a relatively enclosed area and the 'race' would be done in about two months while both sides heavily fortified their sides in the process. What also changed from before was that they were not relying on monolithic structures like forts to act as the principle defenders but trenches which were thought of before as merely supporting features to defensive positions. They were now the star and as we'll learn throughout in 1915 and 1916 it's much harder for heavy artillery to neutralize a trench than it is for heavy artillery to neutralize a fort. Something there was no reason to believe to be true based on prior experience where trench supported forts were basically walked over.
tl;dr: The reason they did not see a war of attrition was because it took a very special case for it to happen. Machine guns and artillery were seen as force multipliers for offensives and in many ways they were exactly that early on and as we'll see in 1918 they did have it right from the beginning. However they are also very powerful defensive tools, particularly machine guns, and when combined with intricate and deep trench systems with dozens of feet thick barbed wire it becomes incredibly hard to overcome those positions. However those positions only work in an enclosed space where you have no choice but to attack them head on which is precisely what happened with the 'race to the sea'. Both sides ran out of room essentially and had no other choice but to have a mini-arms race of who could have the most fortified trench as to not be broken through by sheer force. As the Belgian/Northern France front fortified and the front down on the Franco-German border began to stabilize they would also begin to fortify -- being blocked off by the Swiss to continue Southward and flank. With the addition of natural barriers like forests and notably rivers the South in the Franco-German border would actually remain relatively quiet throughout the war.
This is a bit of a myth. Kitchener, for example, knew it was going to be a long war. Polish-Russian economist Ivan S. Bloch predicted many of the difficulties a decade beforehand, although he predicted that the bloody stalemate would lead to quick economic collapse.
It was split. Frankly, you never know how a war will turn out, and if you see things out of hindsight, you can gain a better appreciation for what they were thinking at the time.