This is a fundamental difference between debit and credit cards.
Credit cards are designed for offline transactions, long before "online" became a thing. They were used only for offline transactions for decades, before the cheap-ish phone lines and modems became commonplace.
It was up to the card holder not to exceed its credit limit (and even today there is some fine print in the contract about exceeding your credit limit - a thing one cannot even try in an online transaction).
In a lot of cases, the merchant usually doesn't get their money right away, they more or less wait until the cardholder pays up. It is the merchant (or their bank) giving you a credit, not the card operator or your bank. The card just certifies that you are (somewhat) credit-worthy.
Since the beginning of 2000s, one rarely needs to make an offline transaction because most things are online anyway. But the possibility and the protocols do exist and can be used.
Debit cards are a completely different can of beer. They are a cash replacement and designed to work online from the start.
They do look similar to the credit cards and work in the same devices, but they work in completely different manner.
Each transaction (even small ones) is checked against your bank account and this is impossible offline. The money are transferred right away.
(This is, by the way, why one can generally deny a credit card transaction and it is up to the merchant to prove that you actually ordered the payment. With the debit card, you pay just like paying cash and it is up to you to prove the transaction is fraudulent. Transaction fee burden differs, too - credit card transactions are paid by the merchant, debit card transactions are paid by the cardholder.)
In today's marketing-dominated world, banks and card issuers make it somewhat hard to distinguish between different product names (e.g. some "debit card with overdraft allowed" are in fact credit cards, others are debit cards and even ordinary bank clerks cannot always tell the difference).