The decline of the Roman legion started long before Rome started getting sacked. It really began with the extremely bad decision to incorporate Germanic warriors into the Roman army. Rome had a long history of absorbing people from the empire's fringes into the polity, first by making them allies, and then eventually by granting them full citizenship rights. But usually, these foreign citizens had developed ties to Rome itself. They were in Latin, they bought into the whole idea of the aristocratic republic. By the 3rd and 4th century CE, though, the empire had been forced to allow the kind of riffraff into their army who didn't really care about the idea of Rome itself. They were only loyal to their commanders.