Any company running a credit check on you is likely to ask for your SSN. As posted, there is no law in the USA that compels you to provide it to them, and they cannot refuse credit or service if you do not give it to them. They will tell you it is useful to them for their automated credit check software to make sure they check the right person. And that may be true for cases where people have a really commonly used name (how many Smiths do you see in the white pages, for example).
The counter to that though is the credit bureaus do not check the accuracy nor the validity of the SSNs in their files. They don’t even do simple data sanity check such as ensuring their is only a single SSN for any given name and file. At one point some years ago, Experian had 3 SSNs listed under my name in my credit file in their system. I was the one who saw that and I was the one who had to formally request an investigation to fix their error (along with over 20 additional errors in their information about where I had lived, collections for purchases from businesses in States I have never even been to, not one but two spouses I never had, etc).
BTW, this was only with Experian - Equifax and TransUnion (and evening Innovis who yes, I checked) all had accurate data. But they all consider their data proprietary so do not check against each other, even when investigating their own errors.
So many years ago, I froze my credit records (after over a year of constant back and forth with Experian to get everything fixed) with all four agencies, and I don’t give out my SSN to any company asking for it for any reason. You do not have to do so, and they cannot use your refusal to do so against you.
The only time a bank or finance company has the right to insist on it is when you’re personally involved in a transaction of $10K or greater, as they have to report large personal transactions to the IRS (so something like a wire transfer for more than that limit coming into your personal account).