The answer lies in history and goes back to the Treaty of Paris signed on 3 September 1783 in Paris between the Kingdom of Great Britain and the United States of America that formally ended the American Revolution.
The signing of the treaty laid the foundation of the United States as a sovereign country, with the United States negotiating favorable terms. The post-war period saw French influence in the area reduce while Britain to gain economically.
Great Britain retained control over Canadian territories, but around 1805, tensions between the Americans and the British were rising and culminated in the War of 1812. In order to outflank the British, the Americans pushed into Canadian territory which was deeply resisted by local Canadian militias, with support from the British. By 1815, peace prevailed and the integrity of borders remained intact.
The American push into Canada led to Canadians coming together for the first time. The British suspected the Americans had plans to take over Canada and so in 1867, Great Britain granted Canada dominion status with permission to self-govern. Great Britain retained control over defense and diplomacy. The move was largely viewed to safeguard against American takeover of Canadian territory.
As human migration and trade increased between the two countries, Canada continued to assert its national status. United Kingdom and United States signed a treaty on April 11, 1908, under which a survey was carried out to formally demarcate the border between United States and Canada.
In 1919, Canada insisted on sending its own delegation to the Versailles Peace Talks and by 1920’s it had taken full control of defense and foreign policy and affairs from United Kingdom.
Today, the United States and Canada share the largest border in the world – 5,525 miles and remain the largest trading partners. Both countries share a very close relationship and cooperation in all areas including education, research, culture and sport.