There are exceptions.
Loans above $333,700 do not conform to Fannie Mae and Freddie Mac guidelines, which is why they are called "non-conforming" loans, or "jumbo" loans. These loans are packaged into different pools and sold to different investors, not Freddie Mac or Fannie Mae. Then they are securitized and for the most part, sold as mortgage backed securities as well.
This buying and selling of mortgages and mortgage backed securities is called "mortgage banking," and it is the backbone of the mortgage business.