When looking at the border between the U.S. and Canada, its almost just a straight line up till the great lake area and Ontario. There a part of Ontario shoots down from the line into the U.S. and after that Maine and parts of other states kinda do the same going a bit north of the line. Why is this? My guess is that it has to do with either the American Revolution or colonisation. Would be happy if someone who knows could explain it to me, thanks.
Not sure if this might be to broad of a question and if it is I'm sorry for wasting your time.
> its almost just a straight line up till the great lake area and Ontario.
So, from a historical perspective, firstly keep in mind that European colonization happened from east to west, so the "squiggly" eastern part of the border came first.
The first efforts to define the border came in 1783 with the Treaty of Paris, which concluded the American Revolutionary War with Great Britain. Article 2 substantially defined much of what is the current international border from the Atlantic Ocean to the junction between Ontario, Manitoba, and Minnesota at Lake of the Woods.
The straight-line western border in a sense also had its' genesis in Article 2 of the Treaty of Paris (1783). The text states:
[...] thence through the middle of said Long Lake and the water communication between it and the Lake of the Woods, to the said Lake of the Woods; thence through the said lake to the most northwesternmost point thereof, and from thence on a due west course to the river Mississippi;
Unfortunately the authors of the treaty failed to realize that such a westward line would not intersect the Mississippi River since the northernmost point of its' course is about 100 km due south of Lake of the Woods.
https://avalon.law.yale.edu/18th_century/paris.asp
The central plains/western border was further defined in the Convention of 1818 between the United States and Great Britain, which took the "northwesternmost point" of Lake of the Woods, and added a jog North or South as required (because they weren't sure at the time) to get to the 49th parallel, from which point the border proceeded due west.
https://avalon.law.yale.edu/19th_century/conv1818.asp
The Oregon treaty of 1846 substantially completed the western border definition, with the existing border continuing along the 49th parallel to the coast, and then proceeding through the Strait of Georgia and the Juan de Fuca Strait.
https://www.loc.gov/law/help/us-treaties/bevans/b-gb-ust000012-0095.pdf