I did a quick search on this sub Reddit first, but nothing really came up. My best guess was because of all the imperial powers and their alliances - maybe someone could expand?
On a very abstract level, a big war right around that time was somewhat likely due to every european great power having a) their own good reason for wanting one and b) the industrial and manpower base to wage such a war. Also, this was the height of european imperialism. Each of these nations had conquered some part of the world with very little effort. Thus they saw war not as a terrible existential threat but as honorable and good.
The direct causal reasons for the war breaking out when it did and in the way it did were the basic strategic situations each belligerent found itself in. When you look at all these strategical necessities from the point of view of each nation, you can see clearly how the had to go to war, once the whole thing was set in motion.
Russia was getting stronger but had no good ports. They definitely wanted to profit form the Ottoman Empire's slow death to change that. But that brought them in direct conflict with the Austro-Hungarian Empire, which in turn was allied with the German Empire. These two nations are the two big western neighbors of Russia, thus Russia would be guaranteed to fight both of them, with Germany being the far bigger threat. To counter this, the Russans allied with Germany's big arch-enemy France. This would force the German army to fight on two fronts against the two biggest armies of the time. This was seen as entirely winnable.
France had gotten a big problem when Germany had united in 1871. Before that, the western german principalities had been in the french sphere of influence, sometimes France even interfered directly. The french also saw the Rhine as the natural border of France. The unification of Germany and the subsequent loss of Alsace-Lorraine meant not only that there was a new strong rival on the continent - when there had been none for a long time - but crucially that the more industrialised regions of northern France where much too close to the border and thus vulnerable. The French also wanted to remove the stain of their humiliating defeat in 1871. So they allied with Russia and planned to go on a big offensive through Alsace-Lorraine. This, too, was seen as a winnable war.
Germany knew exactly what that meant for them. A protracted two-front war wasn't seen as winnable. The only even remotely possible solution was to defeat one adversary and then transport all the troops and materiell by train to the other side of the country, before the other adversary could intervene. It would have been quite impossible to get Russia out of the war in that manner in any reasonable timeframe, simply due to the huge distances involved. So in order to survive, Germany had to crush France before Russia could mobilise sufficiently. German estimates of the russian mobilisation plans meant that this had to happen within aprox. 1000 hours of Russia had giving the order. In order to do this, they come up with a strategic deception: they plan to let the French attack in Alsace-Lorrain and encircle them by making a mad dash through Belgium. This was hoped to be winnable. Also, Germany wanted a "place in the sun", i.e. a colonial empire to fuel the german economy. To this end they constructed the High Seas Fleet, which was meant to rival the Royal Navy.
Britain had tried to keep the balance of power on the continent for centuries. When the German Empire sprung up suddenly, that balance was pretty much obliterated. By the time of WW1, Germany had cought up in industrial output to the British Empire and only lacked access to ressources. This was a direct conflict with british interests. Especially so when Germany started a naval arms race by constructing the HSF. The Royal Navy had to counter this, which cost an aweful lot of money. Removing the threat of german imperialism and the HSF became the prime strategic concerns of Britain, to which end they alliigned themselves with France and Russia in the Triple Entente.
So, in August 1914 the Habsburg emperor of the Austro-Hungarian Empire invaded Serbia for killing his nephew. Russia decides to defend their own vital strategic interest in the region and starts to mobilise, knowing that France will enter the war on their side and this will force Germany into a two-front war. Germany now has to attack France or admit defeat. The Belgians are asked nicely but refuse to let the german forces march through unhindered. Britain uses the violation of belgian neutrality as a pretext for war.
Does this mean the war was inevitable? Does this mean the war was necessitated by a complicated web of alliances? No, absolutely not. All sides could have worked their grievances out diplomatically long before. Germany could simply not have build the HSF and instead only build a costal defense force strong enough to defeat the french or russian navies. (Entirely possible without that massive buildup.) France could have decided that another war over Alsace-Lorraine was pointless. Hell, Germany could have given that piece of land back to France as a gesture to end the feud. Germany could also have let Austria-Hungary be crushed by Russia. Though realistically, Germany should simply have continued Bismark's strategy of keeping Russia as their closest ally. You could come up with lots of such counter-factuals but crucially none of the belligerents were up for anything but confrontation. Does it even make sense to ask whether war is inevitable when all sides want it and everyone knows that?