Blame it on regulation, banks have had to strike back with rule changes that impact how they can charge overdraft fees, as well as how much they can get from fees related to debit-card swipe fees.
If the money is paid back promptly on the next pay day, this type of lending can be cheaper than paying an unauthorised overdraft or a credit card charge.