As with other sales of homes, realtors can earn a commission for working on a foreclosure sale.