What happens if you pay off your mortgage at the end of your term?

The OP mentioned pre-payment penalties.

In that case, sure, they can pay off the loan early, but they have to pay extra if they do. So they are ‘locked in’ to some degree for the five-year term.

In the States, I think few mortgages do have pre-payment penalties, so, yeah, there’s not much lock-in on the borrowers part.

In the United States, currently, few banks make money from the interest on residential mortgages. Most such are sold immediately, within a few weeks, to Fannie Mae, which then uses them as collateral to sell bonds to investors. So the people earning the interest on the loan are actually the people who buy GNMA bonds (or invest in a fund that buys them, which is more common). The issuing bank usually just makes money off the fees and points. So not only do they not care if you refinance in times of lower interest rates – since they weren’t getting the interest anyway – they actually want you to refinance, as often as possible, since they make a few thousand dollars on each transaction. Weird racket.