Yeah, but "opt out" means buggering off to go look elsewhere, where references aren't required.
Whoever ends up moving into that place must have given the reference. So it's not optional, right?
It's the same "opt out" as opting out of paying $30K for that SUV at the car dealership. Oh, and not driving out with it either; that's done by the next buyer who coughs up $30K.
If it legal to ask for a reference, it means that, in the eyes of the law, the situation would be acceptable if every landlord in the country required one. In such a case it would still optional in the sense that one can emigrate, or go sleep on some friend's or family member's sofa.
The point is that people who don't want to give the reference will do so anyway because the circumstances force them to.