Licensing requirements vary by state. MB’s I worked for in the eighties had established lines of credit with which to fund loans. Loan officers, loan processors, loan closers, and loan underwriters as staff is pretty normal. Loans were written and processed to conform to FNMA, FHMLC, FHA, of VA standards and either submitted to these organizations for approval, or in some cases company underwriters were granted authority by these organizations to approve them directly (FHA direct-endorsement or VA automatic was the terminology for that). Once loans were funded, closed, and insured or guaranteed, they were packaged into larger bundles and sold to large institutional investors like Fireman's Fund Insurance. Usually these investors had already pre-agreed to but these loans at a certain price. The relationships and number of these investor/purchasers usually limited/determined the competitiveness of the loan products. So while a finished loan is considered a negotiable instrument and in theory could be sold to anyone, established relationship sales are most common. Many companies do not want the interest rate risk that is associated with volatile markets. Those lenders obtain what used to be called “advance commitments” that agree to sell a loan at a predetermined price before it is even made. MB’s usually package and sell smaller bundles of loans to bigger companies, who in turn package them into bigger bundles and sell them again, etc. etc. etc. Sometimes they are even sold where the seller retains the servicing of the loan and the borrower doesn’t know. Other times borrowers get notices to now send money to XYZ instead of ZYX mortgage.
Warning: My experience with this is quite dated now so much may have changed.
My favorite old MB President was a big gambler. He used to love to make loans and gamble that the market would be up or down between the time he made them and the time he sold them. When he was right, he got to keep the difference between the value of the loan at the time it was made and the time that he sold it. And he was very good at it. He bought a warehouse to store all of his collectible corvettes. I later read about him buying a winery. But if wrong, this would be a great way to lose a lot of money fast...
In theory a MB could make a loan to anyone under any circumstances if he had someone who was willing to buy it. I used to call this “Briefcase Mortgage”. Of course, rates and terms are usually substantially higher as these loans would be considered “non-conforming” as opposed to “conforming” and are much less salable. Whole companies exist just for this purpose. Many others will also buy annuities, life insurance, lotterie winnings, car crash settlement, etc.