Back in the good old days if you didn't obey the king, it was off with your head (or maybe something even worse).
For the northern kingdom we're talking about an earlier period, around 720 B.C., when the kingdom of Judah still existed so there were no Judean returnees, and the Medes and Persians were unimportant tribes up in the highlands of Iran, not rulers of empires. II Kings 17 has the newcomers not worshipping the Lord, being attacked by lions, and then learning how to worship the Lord from a priest who was sent back from Assyria, but it's more likely that the deportations weren't complete to begin with and just targeted the elite of the society.