Sure, but this is one factor that they look at. Sex and age are two other things that they look at that really have nothing to do with insurance except that people who fall into certain categories tend to be higher risk.
BTW some states have passed laws or are passing laws making this illegal.
(Bold mine)
Those things can certainly be shown to be tied to risk, and thus rates.
I'd like to see where they make the correlation between credit score and risk.
Until someone shows me differently, you might as well rate risk on hair color.