After the fall of Rome, Venice was the doomsday bunker of the elites. Extremely defendable position (back when cannons didn't exist), close enough to the shore to transport things and people quickly, yet far enough that it's impossible to besiege. They pooled all their money to build a city on water while everything else around them was on fire both politically and literally.
Also Rome itself was sacked by a Roman army led by a Roman general who happened to be of German descent, and IIRC was more an act of opportunistic looting over grievances than it was any sort of invasion.