As it stands landlords can ask for multiple months rent up front from anyone and get involved with bidding wars, and do whatever to maximise their revenue and turn a profit asap. Bad credit or CCJs isn’t the influencing factor. They can take advantage of people renting generally eg say there are low amounts of rental properties in the area, landlords ask applicants to pay X amount extra upfront to secure the property, knowing there aren’t alternative options for applicants who would therefore end up paying a huge bill. It’s unregulated so they can do this. This new law is trying to regulate such practices.
Ultimately landlords can already refuse to rent to people as it stands, before any changes in the law are implemented. Realistically they already do not want to let to someone with bad credit or CCJs. If they had the choice between poor credit, or an applicant without those issues, they would choose the good credit applicant. However they may still ask the good credit applicant to pay extra upfront to secure it - it’s that kind of thing the law intends to regulate.
It’s a silly argument to say the law disadvantages people with bad credit as the government can’t force landlords to rent to them. Plus it’s likely that someone with bad credit or CCJs does not have the disposable funds to pay lots upfront anyway as they are likely already in debt. Ultimately it is the government’s responsibility to provide housing, not private landlords.