I agree in general, but a credit score absolutely DOES NOT tell you how profitable someone is to lend to, and in general someone with a very high credit score is a very low margin customer.
A score alone does not directly do so. But there is a report attached that will track balances and such. While balance tracking has no "history" in a credit report, lenders can make actuarial guesses based on DTI and other markers which are absolutely included. Which is why, when denied, you don't just get told "Your score is too low" but things like "existing balances are too high", "age of existing accounts is too new", etc.
And that's where interest rates come in. Lenders will typically make similar profit margins on all types of customers regardless of credit score. They charge lower interest rates to borrowers with high credit scores so it all evens out when averaged over a large customer base. Most lending markets are highly competitive so any major differences quickly get arbitraged away.