# Why do we need to prove the gauge invariance of QED (or all of the gauge theories) on the Feynman diagrams language?

Let's have the QED lagrangian. It has explicit gauge invariance, so, by the naive thinking, all of the EM processes must satisfy the property of gauge invariance. So why do we need to recheck of gauge invariance on the Feynman diagrams language? Is is connected with fact that after renormalizing the propagators its poles may shift (so the photon aquire the mass)?

Also what's about non-abelian gauge theories?