In and of itself the assassination was not the direct cause of any conflict. The only accident in 1914 was the nature of the plans in place and the conditions set to trigger them. .
Committed to offensive strategies, dependent on the hope that any war would be short and reliant on the implementation of their carefully developed plans, the general staffs believed they had prepared for almost every possible contingency.
Marwick, Arthur et al., Total War and Social Change: Europe 1914-1955, Buckingham, Open University Press, 2001.
More flexible military alternatives were not considered as the nature of any engagement between 2 such massive armies supported by the industrial might of the world's most technologically advanced nations was not truly appreciated. Generals revelled in the offensive power such technology gave them, whilst ignoring the defensive potential of any opponent using the same equipment and troop numbers. .
This inflexibility was coupled with a flawed Clausewitzian doctrine in which war was an extension of policy , but policy was primarily focussed on ensuring military victory in the next war. Considered alongside the rabble-rousing jingoistic nationalism practiced by many politicians, which once set underway took on a life of its own, some form of military engagement was inevitable. .
Democracy and sufferance for the masses proved a double-edged sword. Earlier British governmental attempts to shy clear of the Naval arms race with Germany were complete failures in the face of determined popular opposition. With a populace eager for battle, allied with a military which was equally keen, it is not surprising that war could become a first rather than last resort.
That all these factors and capabilities came together was more coincidence than accident. And it must be remembered that Ferdinand's death was not the first occasion when such issues all came together. Deterrence worked again and again before 1914, but it only takes 1 failure.