It discourages hiring illegal immigrants, it discourages paying under the minimum wage (so they're not paying taxes, as far as you might have them).

It's a very conservative thing, which also makes liberals happy on principle.

A win-win