Like in theory, someone who closes an account $2.50 in the negative does very little damage to the bank directly. The $2.50 is a small fraction of the annual overhead of the bank account.
Yet these behaviors are highly correlative of unprofitable checking customers. The entire checking account model seems to be based on whales that return the bulk of the profits. If you sneeze wrong, your statistically 10x less likely to ever become that whale.
From a profit maximizing POV, it totally makes sense for banks to do this. But from a "banks are a basic utility" point of view, it doesn't seem to make sense.