I'm not really sure what exactly inspired your question, so I could probably get more specific if you follow up, but basically the south of modern Germany has long been a papal power base. The term for the papalist faction during the middle ages was the Guelphs, a term which has its origins with the dukes of Bavaria.
The second part of the answer is that the resolution of the Reformation at the Peace of Augsburg in 1555 is summarized neatly by the Latin phrase Cuius regio, eius religio- who[ever]'s realm, that one's religion. The ruler of a principality, in effect, decided its affiliation, and the southern princes decided for the papacy.