Alabama did that because they bowed down to hysterical fits instead of letting the issue solve itself.
If the jobs were fundamental to the life of that state, only 2 scenarios would emerge from enforcing the law:
a) The people who deemed themselves "above" such jobs would start going bankrupt and would be FORCED into doing those.
b) The people who are hiring for these jobs would have to rise salaries to be more attractive to the workers who are avoiding the field.
In both cases, you don't need illegal workers from another nation.