A recent survey by ValuePenguin found that the average annual percentage rate (APR) for credit cards ranges from 15.99% for travel rewards cards to 20.90% for cash back rewards cards. Meanwhile, you can get a standard 30-year mortgage today for around 4%.

The reason interest rates on credit card balances are so high is that the loans underlying those balances tend to default at a higher rate than other types of loans.

The Federal Reserve estimated earlier this year that 13.7% of the dollar amount of credit card loans at the nation's biggest banks would go into default if the economy dives into a "severely adverse" economic downturn akin to the financial crisis. That compares to only 2.2% of the dollar amount of residential mortgages on big banks' balance sheets. 

A bar chart showing anticipated default rates by loan type in a severely adverse economic scenario.

Data source: Federal Reserve. Chart by author. C&I = "commercial and industrial." CRE = "commercial real estate."

There are two reasons for this. First, it's easier for people with lower credit scores to get a credit card than it is to get a mortgage. And second, credit card loans aren't secured by one's home, which offers a powerful incentive to stay current on one's payments.

Thus, to offset the higher default rate while still earning a profit, banks charge customers dearly for carrying a balance from one month to the next on their credit cards.

Offer from The Motley Fool: The 10 best stocks to buy now

Motley Fool co-founders Tom and David Gardner have spent more than a decade beating the market. In fact, the newsletter they run, Motley Fool Stock Advisor, has tripled the S&P 500!*

Tom and David just revealed their ten top stock picks for investors to buy right now.

Click here to get access to the full list!

*Stock Advisor returns as of August 1, 2017

The Motley Fool has a disclosure policy.