Besides that England was not fighting Napoleon at the time. They were involved with an economic war with France. And this was part of the reason they impounded American boats they could trade freely with France and England. This bothered both England and France.
In the attack on Canada, America was intending to limit the ability of England to launch naval attacks against America.
I think this is common practice for nations to try to limit the ability of their enemies to launch attacks from nearby bases. From what I understand this was part the reason the the USSR absorbed different territories after WWII and the reason they demanded that American remove its nuclear missiles from Turkey and the reason that Israel took the Golan Heights.I think this was also the reason that America attacked Florida when it was owed by Spain and why it took possession of Alabama --i.e with intent to stop the attack the creek Indians.I will not even go into the reason for taking Texas.