You're overgeneralizing. A company has a limited amount of employees that are working full time. Meanwhile the millions of people who install ROMs may spend a week tinkering and then it's over for them. The chance that a few thousand of them become interested in making their own ROMs (and therefore become software engineers) will become zero thanks to this law.
Governments should not enforce international trade agreements on the off-chance that someone somewhere might have an epiphany while installing illegal software? No.
I would appreciate if you provide a definition of illegal that doesn't amount to "prohibited by law". In this case, the set of laws that are placed in order to protect international trade agreements.