This truly is one of the most fascinating periods in Mexican history. I have with me Dr. Buchenau's book Mexican Mosaic which kind of glosses over the Gadsden Purchase itself but gives a very good explanation of the characteristics of Mexico at the time. But to begin with I'll talk real fast about the landscape of the border in the immediate aftermath of the Mexican-American War
The American Federal Government at this time was quite thoroughly controlled by Jacksonian-Democrats, James K. Polk for example. Polk and his allies believed thoroughly in the idea of a need for westward expansion, the term you may know as "Manifest Destiny." There are several motivating factors that apply here ranging from religious to economic. The origins of Manifest Destiny really stem from Andrew Jackson himself, but are better articulated by the likes of Jacksonian-Journalist John O'Sullivan who wrote in 1845 in regards to the potential annexation of Texas that it was "our manifest destiny to overspread the continent allotted by Providence for the free development of our yearly multiplying millions." So not the use of Providence here suggesting that it was a religious right of Americans to expand westward because God had set aside that land for them. This sort of "Promised Land" mentality is a major driving force in American Culture at the time. He also makes mention of one of the key economic factors, use of land. Now note that any discussion of land in America in the 19th Century is also a discussion of slavery. Following the Missouri Compromise, passed in 1820, really the only land available for slavery to expand into was the Arkansas territory. But Jacksonian-Democrats desired to expand into the Western lands held by Spain and many slave owning Americans settled into Texas itself then owned by the recently independent nation of Mexico. So the two core philosophical components of American Westward Expansion are the religious desire to own the New World, and the economic need to spread slavery.
Understand that "La Frontera" as it is called, the land that was Northern Mexico, is a notoriously mountainous, dry, and desolate region. Outside of "violent" native tribes such as the Apache people did not want to live there, that's why the Mexican Government allowed for the American settlers to arrive in Texas with slaves in tow despite the fact slavery was illegal. But I'm going to stop there because otherwise we are getting too close to discussing the immediate causes of Mexican-American War rather than the Gadsden Purchase.
So we have the underlying cause of the desire for Westward Expansion, let's look at more immediate events. Franklin Pierce is elected president in 1853 and he is a pro-expansion president similar in vein to James K. Polk. In the aftermath of the Mexican-American War the two countries signed the Treaty of Guadeloupe Hidalgo, which the way the treaty was formulated was a big cause for the need of the Gadsden Purchase. The first key issue was that of the new borders between the two countries, a cause of the war to begin with. The Eastern Border is easy to draw, Santa Anna gives one of many concessions in allowing for the border to be drawn along the Rio Grande. But the western border is a bit trickier. There is a term you will often find in studying the history of this region called "The Line in the Sand" used to refer to refer to the western border. There was little in the way of physical barriers such as a river that could create distinction between the two countries, and little of this was territory suitable for settlement. So the line was rather arbitrary and vague, which that border continues to be throughout its history. A key issue of Pierce's administration was the development of a railroad linking the South to the Pacific Ocean, again remember the economic issue of slavery, and what they have found at this time is that the land they currently have in the southwest is ill-suited for the development of a railroad hence they decide to negotiate with the recently reinstalled (yet again) Santa Anna to acquire more land south of the border for their railroad. The issue of which had been tearing apart the Democratic party at the time and leading to failed bills in congress.
Now let me put it lightly, relations between the U.S. and Mexico at this time were far from normalized. Part of the Treaty of Guadalupe Hidalgo was that the American government would protect Mexico from incursions from Apache and other native raiding parties that would cross the border and attack the Northern Mexican states. At the time Buchanan thought that America had the military and financial means to make such a promise. But the reality was far from it, while America did station a force in the area it did relatively little in preventing the raids into Mexico. But even worse than that were the filibusters. So with the crushing defeat Mexico sustained in the War many national and personal interests viewed Mexico as a pie that could be carved up, Mexico itself was in disarray dealing with native revolts in the southern part of the country and issues in government between liberal reformers and conservative elites. During this brief five year period several Americans, such as William Walker, would create their own little private armies and march west attempting to take Mexican land for themselves. As the 19th century Mexican Government often liked to do they turned to Santa Anna to try and solve their problems. So Santa Anna has a few chief goals in mind. First off the biggest thing he needs is money to rebuild the Mexican Army, he would rather this money not come from purchase of land since Mexicans were still furious at him for giving up the Northern half of the country to the United States, and still hate him for that to this day I may add. Santa Anna demands payment as reparation for the damage inflicted by Native Raiding parties that America was supposed to protect them from. But he comes across rather desperate in expressing this cluing in the American delegation to the gravity of his position. The American delegation was led by James Gasden and his chief goal, no matter what, was the Messila Valley for the railroad. So remember that Santa Anna needs the money, he has a country in revolt, he has virtually no army, and he has the very real fear that if he doesn't give up this land then America will come and take it anyway. He needs money, he needs the filibustering to stop, and he is just in a horribly desperate situation. So Santa Anna picks the best possible solution and tries to sell as little land for as much money as he could. Originally the land was going to include parts of Mexico such as Baja California. But the Northern American Senators were able to successfully kill the original planned bill in congress by two votes, to concede to their demands the amount of land purchased by the United States was reduced. Why was this land reduced? The answer yet again is slavery, the Northern Whigs were opposed to any and all expansion of slave territory which the Gadsden Purchase as originally planned had a lot of.
As to how people in the region reacted. Well at the time most Mexicans viewed themselves as part of a region rather than part of a greater country, as I briefly mentioned earlier Mexican Mosaic does a good job of showing that- "This example (the native revolution in Southern Mexico) not only showed the strength of indigenous resistance, but it also demonstrated the regional character of Mexican history. As mention, most of Mexico's inhabitants professed local and regional rather than national allegiances. Indeed, a silver lining of the war with United States might have been the fact that the conflict constituted a significant turning point in the emergence of a Mexican national consciousness. The lost war prompted a majority of propertied Mexicans to agree on a common front vis-a-vis the U.S. invasion force. They knew that Texas and all points west were lost forever, but they hoped to maintain the Mexican heartland under the authority of the federal government." So the Mexican-Americans who were already living in southern Arizona really weren't effected that much at the time, but would see a drastic change in the near future as the Southwestern United States economically developed after the Civil War.
If you are interested about the Western Border of the United States and Mexico I highly recommend Rachel St. John's "Line in the Sand"
edit- I wanted to include that the rest of Mexico was not very happy with Santa Anna giving more concessions to the United States and the government turmoil that ensued allowed for the rise of liberal reformers such as the legendary Benito Juarez