I've been reading Edward E. Chase's book
Maine Railroads: A History of the Development of the Maine Railroad System (1926), and he gives a lot of attention to what he calls "the Quebec railroad virus...that insidious and often fatal idea which has run through the record of Maine railroads from the the beginning".

Chase gives the most succinct explanation I've seen in print of the reasoning behind this obsession. Yes, the idea was to link Maine's ice-free ports with Quebec, but what was the big deal about Quebec? In reality, it wasn't really about Quebec at all, but rather the Great Lakes and the Midwest:
"In 1845 the cheapest route from Ohio to England was by way of the St. Lawrence River. The only defect in this system was the impossibility of winter navigation. It was the plan of [John Alfred] Poor to tap this artery of commerce and to divert the flow of trade to the open winter harbors on the Maine coast." (p. 11)
(Remember that the original reason for what became the Boston & Albany RR was to connect Boston with the Erie Canal and divert some of its Midwest traffic away from the Hudson River and New York City, a pretty similar idea.)
Incidentally, Chase's book is an excellent read and deserves to be better known. With a 1926 publication date I think it should enter the public domain in 2021 (1926 + 95 years). It would be a worthwhile project to have it reprinted at that point.