During the Middle Ages, the clergy and the Church were very influential.
The kings appointed members of the clergy including the bishops and priests.
In return,...
In the Medieval period, every kingdom was at war, everyone was fighting against everyone and it was just a mess.
As technology developed a lot of things changed.