Why do most lenders sell their mortgages?

Some disagree with the practice, but there are benefits

"Why do most home mortgage lenders sell their mortgages instead of keeping them? I have a problem with negotiating my mortgage deal with one firm over a week, then having my loan sold to another firm that I did not select, and with whom I am obliged to deal for as long as 30 years. Is it possible for me to find a lender who will promise not to sell my loan?"