Another aspect of the devil's authority.
This test by Satan would have had no real weight if he was not the true ruler of kingdoms of the world.
This is why when later questioned by Pilate, Jesus answered: “My kingdom is no part of this world. If my kingdom were part of this world, my attendants would have fought that I should not be delivered up to the Jews. But, as it is, my kingdom is not from this source.” John 18:36.
Paul later identified the true ruler of this world at 2 Corinthians 4:3,4. 3 If, now, the good news we declare is in fact veiled, it is veiled among those who are perishing, 4 among whom the god of this system of things has blinded the minds of the unbelievers, that the illumination of the glorious good news about the Christ, who is the image of God, might not shine through.
Who would you suppose desires to mentally blind people so that they will not see the fundamental reality? Also, note that he is called by Paul "a god" meaning a powerful one. But his authority is limited in scope to include only that part of mankind which is alienated from the True God, and is temporary, since both Satan and his supporters, both knowing and unknowing will suffer destruction.
And finally, when the aged prophet Daniel had been praying to God, an angel appeared to him. The angel explained that he would have arrived sooner but the "prince of the royal realm of Persia was standing in opposition to him," and that he only got through because another angel, Michael came to help him.
Obviously the "prince of the royal realm of Persia" was a demon, since a mere human can't stand against an angel of God. Daniel 10:12,13.