Yet banks frequently lend at this rate on unsecured, non-recourse lines of credit (translation: credit cards) based on nothing but your credit score and stated income
They peg the apr on the assumption that x amount of loans will default, however most don’t default and the profit margin from the performing loans cover the loans that defaulted. In short they can spread their risk over many many customers. You are lending to one person so you have an inordinate amount of exposure. (Same idea as insurance paying out benefits which makes that specific policy a loss, however most policies our B”H never claimed).
There are actuaries that get paid very well to price the risk, odds of default, etc.