Because the priests were the only ones who could read the Bible, which in that time was only translated in Latin, people relied on the priests to explain about what God wanted His people to know. So because many priests were corrupt and didn't really want to follow God's commands, they used their knowledge of latin just as a tool to tell people false doctrine like the threat of excommunication, which is supposedly the pope had control over other people's salvation, (which obviously is not true because the pope also is a man, and all men sin, not God, but they told the people that's what the Bible said because none of the peasants knew latin) if the common people didn't obey laws like giving money to the pope.