Because the person not giving salary information likely believes such will negatively affect their offer (as you say), and the one who does likely believes it will positively affect their offer.
Sure, a lower salary may have nothing to do with job performance. But it is an indicator, and a good one.
BTW, paystubs are "stubs" because they are on the same paper as the check which is more difficult to forge.
> The law still helps.
Not providing salary info makes one a riskier candidate, and risk means a lower offer.
It's like buying a car. The less you know about the car's condition, the less you're likely to be willing to pay for it. That's why having receipts for work done on the car by a reputable shop, being the original owner, owner is a grandma rather than a teenager, etc., commands a higher price for the car.
I mean, sure the correlation is nonzero, but it's low enough as to not be usefully predictive for hiring. The correlation is much higher between relative pay and relative privilege, which is not at all about who would be a good employee.
Also, most of my pay stubs throughout my recent career have actually been electronic-only pay statements, and my pay is usually electronically direct-deposited too.
Therefore, any employer-provided pay statement which I pass along would be in the original PDF form, printed from the original, or redacted in a visible and non-fraudulent way by me to remove any irrelevant sensitive info (e.g. before the accepted offer stage I might redact any full bank account number or SSN).
If I were a fraudster, the modified PDF I would share would look just as credible as the original. Far safer to just obtain permission and ask the former employer.