Banks make money on interest. Perhaps the principle itself is the issue, if it's legal to earn money on loans, no surprise a bank incentive is to make you take loan, and have you keep them for as long as it can.
Typically a mortgage does not allow over repayments. Why? It would get people in the nasty habit (from the perspective of the bank) to pay back a little more every month with the spare they've got.
Mortgages have amortization schedules, Banks love it when you pay more as it only reduces the tail end of your loan. You still pay the interest up front.
Not all banks are the same, some have other incentives to pay off early.
With my mortgage, interest is monthly on the remaining principal and paying extra in a month is entirely on the principal - it reduces the total interest paid, so the bank gets less.
The idea that you pay the interest up front is a very common misunderstanding of how mortgages work and more broadly the concept of an amortization schedule.
Yeah, I see people describe it like that all the time, it's never corrected, and doesn't match how I always thought mortgages in general work (and definitely doesn't match mine), so I'm never entirely sure if it's a different system from another country or just a version of the blind leading the blind. Which is why I made my comment so specific to myself.
The parent of that comment mentioning "a fee to overpay" is one I've never even heard of before. Definitely not the case here, free to pay down the principal as much as I want whenever I want as long as the current interest for the month is paid first.
Banks don't care at all how or when you pay your mortgage. They only originate and service the loan. The loan is sold to Fannie & Freddie and isn't on the banks' books anymore.
Only credit unions and small regional banks still hold mortgages on their books. The overwhelming majority(90%+) of mortgages are agency - ie sold to the federal government.