Below is a link to a FRED chart showing the history of Prime rate to the effective Fed funds rate:
One could build a second graph as the difference between Prime and Fed funds rates to see when the custom emerges where the Prime rate is pegged 3% above Fed funds. This pattern appears to be established in the late 1980s to early 1990s. I have never found a paper or theory describing this feature of Prime rate being pegged rather variable as a markup over federal funds in recent history as opposed to the volatile money and credit markets in the not so distant past.
The overnight purchase and sale (loans) of federal funds are similar to short term overdraft privileges one would have at a bank. The discount window loans of federal funds provided by the central bank are given against collateral and at a penalty rate above the effective fed funds rate. Banks can borrow from other banks and non-banks using other money market instruments including repo liabilities, eurodollars, etc. This is an interesting custom because banks in essence as a group create deposits by investing in assets and then must share income with non-bank investors in the money markets to keep interbank payments flowing in the pool of federal funds. I have tried to isolate the mechanism which gives banks the ability to create deposits from "thin air" and it seems to be the overdraft available at other banks and/or the central bank but I can't verify this intuition with available data.
The bank or any other sophisticated financial intermediary is basically able to borrow funds in the wholesale money markets, to lend funds at a retail markup, and to thereby capture the difference between interest income and interest expense as the net interest income. In an economy where credit is being rationed the banks tend to lose interest income and to increase fees to offset the loss of interest income.
Large sophisticated nonbank firms could borrow in money markets or bond markets for some purposes at lower interest rates than would be offered by banks. So banks and financial intermediaries make the markup for underwriting loans to customers who lack the sophistication or ability to raise funds at lower interest rates.