Fannie and Freddie were created by Congress to make mortgages affordable and pump cash into the market by buying blocks of home loans from lenders and bundling them into securities for sale to investors worldwide .