Lenders want to lend money to people who will pay it back as agreed. Lenders want to avoid lending money to people who will not (or want to charge an amount sufficient to cover their increased risk and costs). Borrowers want to borrow money at the cheapest possible terms. A system that correctly predicts who is likely to pay back borrowed funds as agreed serves both borrowers and lenders. That means it's unlikely that it should be made outright illegal.
Regulations around data quality, challenging suspect data, removing erroneous data, how long correct-but-negative items can stay on the report, etc. are entirely appropriate of course.