Risk is the problem, as others have pointed out.
Your fixed mortgage interest rate is for a set period of time only. Let's say your 3% might be good for five years, because that's typical of fixed-rate mortages in Canada. So, what happens in five years if your investment has dropped 50% due to a prolonged bear market, and interest rates have since moved up from 3% to 8%? Your investment would be underwater, and you wouldn't have enough to pay off the loan and exit the failed strategy. Rather, you might just be stuck with renewing the mortage at a rate that makes the strategy far less attractive, being more likely to lose money in the long run than to earn any.
Leverage, or borrowing to invest, amplifies your risk considerably. If you invest your own money in the market, you might lose what you started with, but if you borrow to invest, you might lose much more than you started with.
There's also one very specific issue with the example investment you've proposed: You would be borrowing Canadian dollars but investing in an index fund of U.S.-based companies that trade in U.S. dollars. Even if the index has positive returns in U.S. dollar terms, you might end up losing money if the Canadian dollar strengthens vs. the U.S. dollar. It has happened before, multiple times.
So, while this strategy has worked wonderfully in the past, it has also failed disastrously in the past. Unless you have a crystal ball, you need to be aware of the various risks and weigh them vs. the potential rewards. There is no free lunch.