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.