He gave them the authority when He gave them the power to bind and loose....the magesterium is made up of individuals under the guidance of one individual. In certain matters they are infallible and no other individuals in history have ever been granted that authority...they can interpret the bible because the Holy Spirit inspires their decisions.
snicker
Acts 15:8 God, who knows the heart, showed that he accepted them by giving the Holy Spirit to them, just as he did to us. 9 And put no difference between us and them, purifying their hearts by faith.
1 John 2:27 As for you, the anointing you received from him remains in you, and you do not need anyone to teach you. But as his anointing teaches you about all things and as that anointing is real, not counterfeit--just as it has taught you, remain in him.
The Catholic Church Nickolatains usurpation is counter to scripture.