Then people will avoid applying, and instead apply to the similair job without a bullshit range. The problem is self correcting.
This law is already in effect in Colorado/Washington/etc. Pull up an advert for seattle jobs on indeed and you’ll see that they list a large band, but then a “likely salary” point. Its clear, easy and sets expectations well.