They apply the penalty because by repaying your loan early they are not making any more money off the loan (in the form of interest).