E.g. What if Microsoft has a job opening with a range of $110k - $170k, and the candidate they selected used to make $180k and would like $200k? Will Microsoft offer him or her the 200k they seek or offer 170k and lose their candidate?
If salary ranges can be bypassed, then they are not really useful, and if they can't, by law, companies could skirt the law by offering higher bonuses and more stock, or else lose on talent. Or the company could close the job opening, and create a new posting with an updated range for the sole purpose of being legally able to hire their candidate. Which would still invalidate the spirit of the law.
I'm not sure these salary transparency laws are good for workers or companies alike.