They assassinated the wrong guy - while Ferd was an asshole, he didn't want any war with Russia (he put the empire's stability above personal beliefs). Ferdinand was open to the idea of a triple-sate union of Austria, Hungary, and the Slavic peoples (Serbs). When the Serbs killed Ferdinand, they also killed the relationship between the Serbs and Austria, causing the invasion of Serbia and bringing forth war with Russian. (TLDR: Ferdinand was the prevention of WWI, but they killed him)