After using Babylon to punish Israel, God uses some other nations to punish Babylon for hurting Israel. The point being that even when God withdraws protection from his people and lets you hurt them, hurting them is still illegal. The fact that God doesn’t stop you from doing something wrong doesn’t mean it isn’t wrong. The fact that he uses it – as a punishment maybe – or brings a blessing from it, still doesn’t mean that it isn’t wrong.
God warns Babylon, like he’d warned Israel, the Canaanites, and the people of Niniveh.
The phrase “devote to destruction” is used here too. “Devote to destruction all her army”.