When you want or need to exit your loan early, lenders charge a fee.
The bank essentially bills you for the cost/loss, as they have already secured your funds. They must then invest this sum elsewhere, resulting in a loss.
Important: The bank may approve or reject your early termination depending on your reason.