The Amplified Classified editions adds a few more salient details, Let every person be loyally subject to the governing (civil) authorities. For there is no authority except from God [by His permission, His sanction], and those that exist do so by God's appointment. Therefore he who resists and sets himself up against the authorities resists what God has appointed and arranged [in divine order]. And those who resist will bring down judgment upon themselves [receiving the penalty due them].
Romans 13:1-2 is encapsulated within Paul's larger exhortation, encompassing Romans 12 through 15, explaining how God's called-out saints should live in the world, especially in relation to others beyond their own families as well as their spiritual siblings.
After teaching about love, humility, and peace in chapter 12, Paul turns to the follower of Christ's relationship with the civil government.
During the time of Jesus Christ and the apostle Paul, the Roman government was primarily under the rule of Emperor Augustus and his successors, such as Tiberius (reigning from 14-37 AD), Caligula (reigning from 37-41 AD), Claudius (reigning from 41‒53 AD), and Nero (reigning from 54‒68 AD), probably the most cruel and evil of all the Caesars.
Augustus came to power in 27 BC, significantly expanding the Roman Empire, including Judea as a province, appointing Herod the Great, who played a crucial role in the life of Jesus, including the events surrounding His birth and crucifixion. Historians have characterized the Roman Empire as a centralized government, establishing extensive road networks, and having a common language which thankfully facilitated the rapid spread of Christianity and missionary activities of the apostle Paul.
Paul understood that the Roman government was an extremely powerful, and sometimes evil oppressive system. Yet, Paul still calls believers to recognize the legitimacy of governmental authority within God's sovereign order.
Where is power? Power is with God. And from His position of power He delegates to certain individuals a portion of power and responsibility. Those to whom He delegates the power are responsible, or they are accountable, to Him.
In the New Testament, despite the fact that the nations have in no way made a covenant with God like Israel did (and in many cases the governments are despotic, chaotic, bribe-taking, abusive, unjust, uncaring, unmoving, and insensitive), their power and existence flows from God.
God is not responsible for what they do, but He does not make them do the things that they do. They have free moral agency as well. But we have to understand that they exist only because God has deemed it so.
Their purpose is seen here, in the New Testament, to be generally good. At least, it is better than the alternative, which is no government at all. The reason is that it is God's intention that the purpose of these governments—to whom He has delegated His authority—is to keep order in the community. The Christian, then, is to honor its power, as sent by God—to keep life from social chaos, to be a deterrent to evildoers, and also to be a rewarder of those who do right and good.