Alvin, most sub-prime lenders require these so that they are guaranteed to make a minimum of the pre-payment amount for the cost of servicing the loan. Most sub-prime lenders will not allow a broker to make (YSP) if they buy out the pre-pay, and will also add a hit to the rate around 1 to 1.5% in general.
In reality if you lend someone say $200,000 and they sale thier home in say 3 to 6 months with no pre-pay then the lender really has gained anything. All they did was tie up $200,000 that could have been used on a long term buyer. All lenders that do pre-payment penalty loans ofer an option for the buyer to buy it out, but it comes with a pretty large cost to close the loan.
Conforming A credit lenders also require these in certain loan scenarios. Investment property that is going to be closed than flipped in 3 months does not ofer much to the bank for taking the risk.