Under the latter the range for SWE could be 40-80K and so a new employer could possibly find that job posting from around the time you say you were hired but still shouldn't have any idea if you were making the 40k or closer to the 80k. I believe this is intended to curb the market behavior of offering someone a pay you think they will accept rather than offering to pay based on the value of a role.
Turning the difference between those two numbers into cream for upper management to butter their bread is the status quo in America at the very least and likely in all of the western world, but leads to systemic discrimination amongst protected groups with weaker negotiating power.
Several states have implemented similar rules (CO and CA, IIRC). A job listing would typically list either a minimum salary or range for a position. "Senior Developer, $120,000-$150,000" or whatever.
Two upsides to this approach... First, an employee is not limited by their current salary - they can negotiate on their value. Second, it's widely accepted that women and minorities tend to be less aggressive salary negotiators. Those two things together, applied over a career, can make a massive reduction in lifetime earnings for employees.
* Government jobs are the big exception - you can search for most university salaries because most receive government funding. Same for local government offices.
(Note : I don't really agree with this as it's relying on salary secrecy but I think that's the logic.)
Anyway it doesn't really matter; you apply for a job, if you don't meet the criteria, that's fine. But if you DO meet the criteria but pay you a little more than your previous job, but less than others with the same job, that's going to be tackled by this legislation.
The best they can do is that instead of underpaying you, they will say "You did not pass the interview process for this job".