Depending on how this is being structured, a borrower might end up paying the same amount as the original loan if the new loan is held to it’s full term.
The main reason why such creativity can be entertained by a lender is that the borrower is an investor who wants to claim deductions from interest expenses.
It might also be that the borrowers has the intention of fully repaying the loan in the near future. The new structure might enable him to save on penalty charges.
However, lenders are usually aware of such strategies and would often impose higher prepayment fees on the new contract so that they have their bases covered.
In this case, a borrower might still save money compared to the terms of the original loan. And the lender would be able to book in more interest income on top of the penalties, and get their principle money back sooner which would be lent to a new borrower.
All parties win in this arrangement.
However, such agreements are not often made. And when they do, it usually involved savvy investors rather than regular homeowners.