I oversimplified my explanation of debit cards and how they work. Depending on the merchant and several other factors, the transaction may be posted immediately. However, it is not settled until the end of the business day...at the earliest.
Settlement occurs at one of two possible locations.
The simple one is at your financial institution. This occurs when you and the merchant both have accounts at the same institution. Such a transaction is referred to as an "on us" transaction, and thus never has to leave the financial institution.
The more complex one occurs at the Federal Reserve. Settlement at the Fed happens once daily for all but a handful of transactions. The instant settlement transactions don't happen often, because they're expensive. Your merchant will never opt for this for the basic debit card transaction because the processing fees would kill them.
It can get more complex than that, too, but the additional subtleties aren't worth going into here.
So why do you see the transaction post (not settle) instantly? For a few reasons. One is a reduction in risk. The transaction becomes a fully-funded transaction at that time, because you cannot spend that same money a second time. This makes for lower interchange fees to the merchants. Another reason is float. Your bank takes ownership of the funds immediately, and can earn interest (albeit a really small amount) until the transaction settles.
Again, there's more to this story, too...but it gets really complex from here. 🙂
And writing a check in person is not, by any stretch of the imagination, the same as handing over cash. For one thing, you can go home and immediately put a stop on the check. Try doing that with cash. For another thing, you can still write rubber checks. You still have the float until the check hits your account; with cash, you lose the (useful aspects of) float the minute you pull it out of the ATM.
The only significant change (within the scope of this thread) is a reduction in the time to settle. Yes, there are many other significant changes that come from Check21, and I don't like quite a few of them. But that's for another discussion.