Banks charge prepayment fees to compensate for the interest income they would have earned if the loan continued as per the original repayment schedule.