Yes it was. The Germans wanted a fight with the British Go watch the History channel, you may learn a bit
The British and Germans were involved in an arms race much as the Americans and Soviet Union were during the cold war. However, an irrelevant assassination in the Balkans should never have been a casus belli and certainly wasn't worth the millions of lives it cost.
WWI was a war manufactured by the shady money men to sell arms to both sides. Vietnam was made to last as long as possible, to make American manufacturers richer. Iraq was oil. Libya was destabilized deliberately by American Agent-Provocateurs to get at the oil. They tried the same in Venezuela and failed. Human-life is cheap, Oil companies need to survive. p.s Syriana is one of the best films ever made
And the Germans wanted territory. so to get it they needed to knock the Brits out. So they needed the war. And yes it was a terrible waste of life
We might have had to fight them at some point anyway, but this was certainly not a valid reason. It's like saying Kennedy should have nuked Russia during the Cuban Missile Crisis because war was inevitable.
WW1 could have been avoided at so many points. But too many arrogant, power-hungry people in high level command refused to lose face and back down. Loss of life (particularly as if affected the working classes and not their own) wasn't seen as much of a deterrent, maybe because warfare had never been quite as bloodthirsty as it was by then. The unprecedented level of carnage meant that much more effort was made to avoid WW2 (appeasement). Though WW2 was a much more just and necessary war.