The Church had numerous problems during the 10th and 11th centuries. First of all, there was lay control, when lords or kings appointed bishops, abbots, and even popes even if they weren’t the right religious material. The church was ruled by these emperors and lords! But Pope Leo the 9th began the moderate reform as he was not going to allow others to take the pope’s power away from him. He helped abolish Simony, the sale or scandal of church offices and he emphasized the authority of the pope to choose the right people for the offices.
Later Pope Nicholas the 2nd appointed the College of Cardinals to choose the pope, not the king.
These actions were great advances in the history of western civilization without them we would be dictated by government officials even more so.