Answer:
What accounted for the shift was the same thing that accounted for the shift in other parts of the world: the development of agriculture.
Explanation:
When a society develops agriculture, it shifts from being nomadic to being sedentary. This is because of two main, intertwined reasons:
The first is that growing crops is a burdensome activity that demands a lot of time, and care: ploughing the land, planting the seeds, tending the crops, caring for them, and picking them in time of harvest. This makes growing crops clash with a nomadic lifestyle.
The second reason is that agriculture is a more efficient way to produce food than hunting or gathering. Agriculture does produce a steady supply of food when the crops do not fail, while gathering and hunting hardly produces what is necessary for survival. This is an incentive for early societies to develop agriculture.
James K Polk is one of the historical figures that is really hard to judge by modern standards.
He was a forceful man with strongly held beliefs. He was the last in the line of "Jacksonian Presidents" with all of the baggage that came along with that.
Ultimately, he was a strong war time President. His single term in office led to the short lived Presidency of Zachary Taylor, who was significantly less informed and forceful than Polk. After Polk, the issue of slavery really came to the forefront. Polk was either responsible for delaying the prominence of this issue or just got lucky. It is likely that history would look much differently if Polk had a second term and continued his aggressive posture towards America's future.
I'd say he was a good President, for his time, who strongly acted on the economy and in regards to Mexico but whose record looks abysmal by modern standards and values.