Laws can be passed to make this painful for companies.
Department of Labor, either at the state or federal level, can enforce companies trying to play a game with their numbers.
Also the collective pressure of the market would have a mitigating effect. Game theory comes to mind, would you apply to a job listing like that? Would you apply if every other job listing has a more "honest" range posted, or would you spend your time applying to companies that are cooperating with the state government?