This would be workable if it also results in the person losing their visa. There must be some downside for the employee, otherwise it's an invitation for abuse.
If the worker gets to keep their visa then it's just a backdoor way to get a company to pay for their visa and relocation so they can immediately quit and then go do some other job they actually want (at no expense to the next employer).