This is because Alaska was bought by the US from Czarist Russia and was not an original US territory, so it looks like Canada is sandwiched in the middle on the map.
After the Crimean War broke out in 1853, Russia, fearing that the Alaskan colony would be lost to Britain, proposed selling Alaska to the U.S. On March 30, 1867, the U.S. bought nearly 1.7 million square kilometers of Alaska from the Czarist Russians for $7 million plus $200,000 in commission, an average of only two cents per acre of dirt ? . The effective date of the land contract was Oct. 18, 1867, and the state has designated that date as "Alaska Memorial Day."
Expanded:
History of Alaska:
In 1741. Danish navigator Vitus Bering sails to the Gulf of Alaska.
In 1784 the Russians established a settlement at Three Saints Bay. The area was part of Russia from 1799.
After the outbreak of the Crimean War in 1853, Russia, fearing that the Alaskan colony would be lost to Great Britain, proposed selling Alaska to the United States
On March 30, 1867, the United States purchased Alaska from the Czarist Russians for $7 million plus a $200,000 commission.
The District of Alaska was created in 1912.
Statehood in 1959 as the 49th state of the United States.
University of Alaska established in 1917.
On February 5, 1985, it concluded friendly relations with Heilongjiang Province in China.
Baidu Encyclopedia - State of Alaska