Throughout history, most kings and emperors maintained their power by putting themselves at the head of the local religion. This has often involved the king performing priestly functions and rituals and often claiming a family relationship with the divine authorities. Naturally, lesser mortals were reluctant to argue the point.
Christianity, which became the official state religion less than a century before the Roman Empire in the west collapsed, convinced the new barbarian rulers that a special relationship with the Church could be arranged. Thus some, but not all, kings in Europe were anointed by a Bishop or a Pope during their coronation. Thus rebellion against the king became blasphemy as well as treason. The kings appreciated this, and supported the Christian Church in turn.