A bank loaned money to a rancher to buy a ranch. The loan was secured by a mortgage on the ranch. Several years later, the rancher obtained another loan from the bank; the second loan that was also secured by a mortgage on the ranch. The rancher was personally liable on both loans. Each loan contained an acceleration clause that made the full amount of the outstanding loan payable upon default. Subsequently, the rancher defaulted on the first loan at a time when the fair market value of the ranch was $75,000. The bank purchased the ranch at a privately held foreclosure sale for $70,000, the outstanding amount owed by the rancher on the first loan. Because the rancher no longer owned the ranch, he was in default with respect to the second loan. The bank brought an action against the rancher personally for $30,000, the outstanding amount owed by the rancher on the second loan. The court awarded the bank $25,000.Which of the following reasons best explains the court's ruling?
A. To deny a deficiency judgment when a foreclosure sale is privately conducted
B. To prevent unjust enrichment of the bank
C. To deny a deficiency judgment when the loan is secured by a purchase-money mortgage
D. To limit the rancher's overall liability to the fair market value of the ranch