Popes used the threat of excommunication to their advantage as a focus of life back then was religion and excommunication separated you from the members of your church and couldn’t allow you to have a proper burial if you died when excommunicated. In modern times, it’s not as big as a deal for most people.