Why do banks or credit card companies give out astronomically high credit card limits knowing that the average consumer can’t repay such a large balance?*

They don’t. At least not unless there’s a massive bug in their credit decisioning software.

The point overlooked by many people is that credit card debt is open-ended. Personal loan and BNPL / consumer loan are fixed tenors, typically 2–36 months. “Can’t repay” is a tricky term when it comes to credit card debt.

Unlike those loan products, a credit card debt can be carried forward indefinitely as long as the credit card holder pays x% of the outstanding balance at the end of the month. A credit card debt becomes delinquent only when the credit card holder does not even pay that x%. It does not matter how much debt has been racked up until that point, subject to the proviso that it does not exceed the credit limit.

x varies cross banks and jurisdictions but it’s typically 10%. Which means that credit card offers 10X leverage (being 100%/10%), something that personal loan and BNPL / consumer loan products don’t.

A credit card line of credit may seem astronomical but it’s only because it’s 10-20X of what a layperson would consider “affordable / repayable”. I’m oversimplifying things here a bit but it’s only to emphasize the one fundamental difference between credit card and other retail credit products.

(A close equivalent is margin trading limits set by stock brokers although they tend to require collateral, which credit card does not since it’s an unsecured credit product.)

*: This is the original question I answered. I’m repeating it to help me make sense of my answer in case it’s moved to / merged with some other question that I didn’t answer.