The reason was largely because their seaport locations made the importation and exportation of goods and materials, and particularly coal, more economical than the considerably inland, and therefore only accessible by train, Lowell.
The rationale was primarily due to their seaport positions, which facilitated the efficient transportation of goods and materials, especially coal, over those situated inland and thus only reachable by train in Lowell.