Fannie Mae and Freddie Mac are government-sponsored enterprises that provide liquidity and stability to the mortgage market by purchasing loans and transforming them into securities.