AFAIK the "overnight loans" are a vehicle to dodge the reserve requirements for banks. In theory the bank is not allowed to fall below a certain reserve threshold because they would be too fragile towards bank-runs. This is needed because left to their own devices banks would just leverage to the max regardless of their cash position.
The crucial point is that the reserve is only measured at the end of day, so a bank can dip below the safety thresholds as long as they make it up by the evening. Overnight loans allow them to ignore the safeties since they just loan the cash for a brief moment to be in the clear with regulation come the daily measuring, but just return the money straight after the measurement has taken place.
It is an organized method by which the Fed facilitates regulation dodging for the financial sector.