I'm usually one to side against the banks as well, but yours is clearly an issue of over-reliance on the automated system.
It is convenient to have your account information available with the click of a mouse, but you MUST still keep track of your balance independently. The automated system has these "lags" built into it, and sometimes they seem rather dubious.
But in your case, the only real issue you have is that the bank continued to allow you to conduct transactions when you had no money in your account, for which you were subsequently penalized.
In general, I would recommend that everyone switch to a small, locally owned bank or a credit union. This particular OP would have experienced the same problem regardless. But you're much less likely to run into traps that seem downright fraudulent, and much more able to correct errors, when you're not dealing with a "mega-bank."
As for the second rebuttal, I don't agree that the cards are entirely stacked against the consumer per the law. There are laws in place to protect consumers from many egregious practices that banks undertake on a regular basis.
Regulation cc, for example, places limits on deposit holds, and states that any hold that is "unreasonable" is illegal. I once deposited a large, certified check into a Chase account. After five days of waiting for Chase to release GUARANTEED funds, I called the issuing bank, who informed me that the check cleared the day after I deposited it, and that Chase had possession of the funds the day after that.
Within a half hour of explaining to the branch manager that it was "unreasonable" for them to hold my funds past the second day, and that the continued hold violated Regulation cc, the money was available.
Lesson learned by me: familiarize yourself with the laws and regulations applicable to banks, and don't be afraid to throw around some threats of legal action.
Lesson hopefully learned by the OP: get your money out of the big banks, and never depend on your online statement.