Austrians needed better commanders, Prussian divisions arrived towards Königsgratz piecemeal, setting themselves for defeat in detail, but Austrian commanders passively waited for Prussian forces to assemble themselves and engage them.
Maximilian signed off the succession rights for him and any descendants he might have before he embarked on Mexican adventure, it was a concession FJ wrought out of him in exchange for allowing him to recruit troops in Austria.
Basically, after 1815 the empire needed a new nemesis, since France and Spain were in shambles, with Russia being the only country in the world that could be portrayed in such way without being laughed at by everyone.