The US had Mexico completely defeated. Why did the U.S. not annex the entire country? The corrupt culture left over from Spanish colonialism could have been stamped out quickly and the spanish language replaced.
There are two different uses of the word Mexico and it's important to note the distinction here. The first can refer to the government of the nation of Mexico, only one of several actors in the war. The second refers to the area of Mexico, a loosely organized geographic region of many different political and social entities competing and cooperating. This is a critical distinction to make because the first was effectively defeated during the war. By its end, the government of Mexico had no political capital left with which to continue fighting. The US never came close to subduing the area of Mexico though.
School textbooks never talk about the latter side of Mexico, although it's essential to understanding the Mexican-American war in its entirety. This is a relatively new idea in Mexican-American War scholarship, but there are a few sources available including:
Santoni, P. (1996). Mexicans at Arms: Puro Federalists and the Politics of War, 1845-1848. TCU Press.
Levinson, I. W. (2005). Wars Within War: Mexican Guerrillas, Domestic Elites, and the United States of America, 1846-1848. TCU Press.
Levinson, I. W. (2009). A New Paradigm for an Old Conflict: The Mexico-United States War. The Journal of Military History, 73(2), 393-416.
Frazier, D. S. (1998). The United States and Mexico at war: nineteenth-century expansionism and conflict. Macmillan Library Reference.
Delay, B. (2007). Independent Indians and the US-Mexican war. The American Historical Review, 112(1), 35-68.
To recap the state of Mexico by the end of the war, the US held complete naval supremacy on both the East and the West coasts. All of the major ports of Mexico were in American hands or blockaded and useless. The US controlled many of the largest cities. But the US was unable to operate freely outside the urban centers. The interiors of Baja, the desert north, and the yucatan were closed off to all American forces. Attempts by US troops to disrupt guerrilla operations were deemed too expensive under political constraints of the war. In fact, these rebel groups were disruptive to both Mexico and the US. At the height of the conflict in 1847-1848, more Mexican troops were fighting the internal civil war than were engaged in the war against Americans, northern Mexico had lost over 80% of its population, and an entire country seceded in the south. The government of Mexico, which I've heretofore presented as a single coherent entity was itself a complete mess of competing factions, more akin to a herd of cats than a political institution.
The US was aware of all these difficulties with Mexico and on the whole had no wish to inherit them. The All-Mexico movement's influence was waning by the end of the war, in part due to the fact that annexing Mexico would have required integrating Catholics or the even worse brown Catholics. I've covered this in a couple of previous posts.
In the end, the US inherited the least populated northern lands of Mexico. Just these led to a further 3 decades of war and genocide in the Indian Wars. The US was in no position to handle the rest of Mexico, a vastly larger, more hostile, and more densely populated region. Even if for some insane reason, the US had decided to annex all of Mexico, it would have kept speaking Spanish and continuing with its "corrupt culture". Examples in the Philippines, Puerto Rico, and Cuba all indicate the tenacity of Spanish institutions under American imperialism.
"Religion without Restriction": Anti-Catholicism, All Mexico, and the Treaty of Guadalupe Hidalgo John C. Pinheiro Journal of the Early Republic, Vol. 23, No. 1 (Spring, 2003), pp. 69-96
Griffen, W. B. (1988). Utmost Good Faith: Patterns of Apache-Mexican Hostilities in Northern Chihuahua Border Warfare, 1821-1848. University of New Mexico Press.