Because its *that* hard for the bank just to not pay dds and other automatic debit transactions if there are no funds available??????
Beggars belief...
The Direct Debit, Mastercard debit and Visa debit transports do not support balance querying. They could, but they don't. They are legacy systems and need International acceptance and upkeep.
This is why Visa introduced Visa Electron - a new system capable of balance querying (performing custom authorisation checks at your bank).
Visa, Mastercard etc can do:
Your card -> PIN terminal/online debit -> Your account -> Authorise -> Debit
However, most of the time they can not do:
Your card -> PIN terminal/online debit -> Your account -> [Your bank -> Balance query -> Authorise ->] -> Authorise -> Debit (or refuse)
Mastercard/Visa is a legacy system and progress is held back by a number of things (International acceptance, pressure from the supermarkets (believe it or not)). This is why they introduced another system, Visa Electron, which can support these kinds of 'cashcard' services.
Unless (for example) your bank is HSBC and HSBC also provides the terminal or debit service for the company trying to debit your account, on the traditional Visa/Mastarcard debit systems, balance querying cannot take place.
In the case where your bank supplies you AND the terminal you are using, the bank may have implemented their own hackery to make two connections:
1) Dial into the bank, do a primary authorisation (which includes balance check). If that fails, the transaction gets blocked. The transaction doesn't even make it onto the Visa/Mastercard/etc transports.
2) If (1) succeeds, proceed with the typical transaction support.