The first part of the Secondary Mortgage Market is the banks, mortgage broker, or mortgage lender. This is the only time borrower will interact with the Secondary Market without possibly even knowing it. The lender will go through all the requirements with you of what you need in order to obtain the mortgage- credit score, income requirement, length of the mortgage, etc. These requirements are decided by the government identities, Fannie Mae and Freddie Mac. This allows the mortgage to be sold to the government identities if they follow their guidelines. So chances are the lending company a person obtains their mortgage from will not be the same one their making payments to for the life of the loan.
To initially make the loan they need money to close the mortgage before they sell it off to the government entities. Bankers typically use their own capital to fund the closing of the loans. Mortgage bankers use a warehouse line of credit to initially fund these loans. A mortgage broker will search to find you the best mortgage option throughout all the channels of obtaining a mortgage.
But how do they make their money? A typical mortgage lender in the United States makes a profit off their fees to originate a mortgage and the difference of interest rates between given to the borrower and the interest rate the secondary market bought it for. This helps the mortgage lender get instant profits and return of the money just lent instead of waiting the whole life of the loan to receive that.