You're mixing up two different things: landlords borrowing from the security deposits they're holding while tenants are still there, and landlords wrongfully keeping security deposits when tenants move out. I agree the latter is bad but not the former.