Sarajevo was disputed between Serbia ( who wanted to have power over it) and Austria (who had the power over it at the time).
Franz Ferdinand was assassinated by a Serbian rebel, which was possibly more important, because this led to a conflict between Austria and Serbia, and then to the conflict between Russia and Austria, as Russia sided with Serbia.
Another take on this was that Bosnia (Sarajevo) was an important ground for the two empires: Austria and Russia, as a possible (or actual) sphere of influence and expansion, and it was important for the two powers to show their strength there.