Proximate versus ultimate causes. If a war started because America boarded a Chinese vessel, it also-obviously–wouldn't solely be because of that.
After the Franco Prussian war people realized that the next war would involve massive armies full of mobilized (conscripted) men and the country that could mobilize first would win. Countries spend decades planning for this by manufacturing enormous stockpiles of uniforms, giving their entire male population military training, etc.
But the mobilization schedule for even the fastest country was still measured in weeks, but this was a process where days count. Basically once the decision was made to mobilize millions of people across an entire modern society would leap into action transforming itself into a marshal society. Millions of people getting called up, trains full of equipment going everywhere.
Turning off a mobilization that was in progress was fairly difficult to conceive of, so once the decision was made the flywheel would take over, but decision to mobilize had to be made in a pressure cooker environment where hours mattered.
The death of the duke wasn't the "cause" of WWI it was the starting gun for a race where the horses were all waiting impatiently at the starting line.
~"you can't say they slept walked into WW1 when they gave thousands of commands to move horses and men"
Also, in France Caillaux, one of the most powerful pacifist in the government (he had the economy and was _good_ at it, which is rare enough to be noted), who was anti-war, had to be let go because his wife killed a journalist (not really a journalist, but adjascent enough so that the difference don't matter) around the same time, leaving Jaurès alone to push Viviani to let it go. Plus Viviani was with the Tsar in Russia when the ultimatum was given, which surely did not help _at all_. Especially since Rasputin was out of the capital at the time. Truly an unfortunate timing here.
Plus the death of multiple diplomats involved in the prevention of WW1 at least once in 1911, who all decided to die around the same time (the last two in 1914, Pressensé and obviously Hartwig, whose death was truly, truly unfortunate).
And here i'm only aware of French people who would have prevented the war (beside Hartwig and Rasputin, but everybody know about them), but i'm pretty sure even more people in Germany and in Austria could have done the same.
If the top diplomats had managed to avert the Serbia crisis then the war would have been delayed until the next crisis.
The fundamental problem is Europe had built itself a civilization-strattling war machine with no "abort" button and put the start button on a hair trigger (the interlocking treaty system).
Which probably wouldn't have worked, but maybe it could have been a much, much smaller conflict.