There are international arbitration courts and other methods to claim non compliance. Instead Hyundai chose to break the law. Understandably, the law wasn't being enforced, so practically it made sense to do as they did. But then the public voted to elect someone who promised to enforce that very law.
So Hyundai played the wrong cards, unlike American companies working in South Korea that hired locally or obtained visas.