Sweden's parliament passed a law on Monday allowing authorities to revoke immigrants' residency permits based on bad behaviour, such as having unpaid debts, doing undeclared work or links to extremist organisations.
The law, which covers pending permits but also retroactively already granted permits, is part of a wider tightening of immigration rules by the right-wing government and its support party, the nationalist Sweden Democrats, ahead of a parliamentary election in September.
The law has been criticised by the opposition and human rights advocacy groups as arbitrary because decisions would be taken on behaviour that has not been deemed criminal.
You're right that crime ("side of things" I think) is a problem. It's a problem everywhere.
You're wrong about it being a necessary step. It's political pantomime at best, it's racial dog whistling at worst. Adding extra rules won't solve crime as you pointed out there a potential of being misused.
It takes a large effort from politicians and a native population open to identifying what are the causes of crimes from the immigrant sector. Lastly, it takes money and resources, which no one wants to foot the bill for.
I don't know what the solution is, but this isn't it.