It is not completely correct to say that the West sided with the North for this entire period. The first settlers in the West were Southerners. They were poor whites who came west because they could not really make it in the plantation economy of the South. This did not, however, mean that they disliked the South, just that they wanted to go somewhere where they could have more economic opportunity.
As time went by, however, the West did come to be tied economically to the North. This came about with the creation of the Erie Canal and other canals that allowed the West to have access to Northern markets via the Great Lakes. Railroads, as they came to exist, went to the North as well. These things meant that the West had economic connections to the North and therefore "liked" the North more than the South.
Between 1790 and 1860, the Western States liked the North better most probably because the West and North did business better with each other. To clarify, during those years, the Southern states did not really like the Northern due to the fact that the Northern states were indsutrializing and asking the South to do so too. At the time, the Southern states were primarily based on an agriculture market that they maintained and prospered a lot through with European nations like England (they also did trade with Northern states).
Because the Southern states were an agriculture based area, the Western states turned their attention to the North. Don't forget that the Western areas were not areas that plants can be grown on. For example, California was mostly desert and the Rocky Mts are mountains, plants struggle to survive at such high elevations. Not until the Chinese immigrants immigrated to the Western states through Angel Island did the Western states actually begin planting.
Due to the lack of fertilized and plantable soil, the Western states could not plant much vegitation and could not therefore trade with the Southern states. Western states did have somethings however that the Northern states demanded. Things like raw materials like cattle meat, coal and other mining industries that were also centered in the Northern states. In other words, the Western states had an oppurtunity because the Western states were like the suppliers to the North.
That is why between 1790 and 1860, Western states traded more with the Northern states than they did with the Sounther.