The lending bank finances the mortgage on the financial markets, the spread between their interest rate and the one the bank clients get is the banks profit. Part of the terms and conditions are that those profits for the bank are what you, as the oerson taking the mortgage, owns the bank for the duration of the interest rate fix. That is capped so, by law, at 10 years. Partial down payments are negotiable, e.g. 10% of the initial loan per year. Anything above that, and prior to that 10 years, will incure the clients obligation to cover the banks lost profits (part of what you agreed to pay the bank). If the explanation makes sense.
Canada is similar - usually you can prepay up to 15%/year, but any more than that and you need to pay a penalty (which seems to be calculated based on the interest they would lose). Also the yearly prepay amount is use it or lose it.
20% lose-it-or-lose-it yearly is my experience in Canada, and I believe that's on top of being allowed to make double payments.
And yes, the prepay penalty is generally based on the interest they would lose or a few month's interest, whichever is better for the bank at the time of payment.
But also note that if you paid the extra for a 10-year, Canadian federal law says you can prepay 100% at any time after 5 years with no penalty (or virtually no penalty?). Which is part of why longer-term mortgages are markedly more expensive.
Another interesting aspect of Canadian mortgages (as opposed to US ones) is that you can't just walk away if the mortgage is underwater (which is what a pot of people in the US did after the GFC). The bank can come after you for the difference between house value and mortgage.