"The only reason a king was ever appointed was because of the moaning and groaning (as usual lol) of the people."
Precisely! The state is and has always been an egregious error brought on by human hubris...
Human states are, in fact based on the very same sin Satan committed when he fell from grace; namely, aspiring to be like God.
"... when Jesus speaks of the only power Pilate had was given to him by God could also allude to the premise that this temporary authority was permitted by God in order for various prophecies concerning the Messiah to be fulfilled. This would not legitimize governments but have them serve a purpose for the fulfillment of prophecy."
You're also precisely right about this. God often through history uses fallen and corrupt human states to accomplish his purposes. The thing to bear in mind is exactly that this in no way legitimizes those evil beasts, nor does it constitute God's stamp of moral approval. This can easily be seen in that God subsequently judges such national behavior by destroying those nations.