TD Bank was slapped for the exact same process. Transactions would be reordered to ensure you incurred hundreds in overdraft fees even though you had just deposited a check.
It's a bit of reverse check kiting: The bank changing when your check clears so that you actually don't have the money you think you do.
Now, there were fine print that stated only X dollars worth of your deposit would be "Available immediately", but even that was a lie.