The main issue between the US and Mexico was the American Southwest and whom it should belong to. Mexico had held this land since their separation from the Spanish Empire, and the US wanted to buy it for $30 million, but Mexico staunchly refused to sell. Also, US citizens (including former US Congressman David Crockett) had fought and died fighting for the Republic of Texas, and after ten years Texas had recently become a US state. The disputed Tex-Mex border then became an issue for the US. Also, in the opinion of this contributor, religion may have been an issue. Christians were no longer fighting official wars over religion, but it probably did not help that the US was Protestant and Mexico was Catholic. And Manifest Destiny was likely part of the picture. Mexico was not developing the Southwest, but Mexico's refusal to sell the land prevented the US from gaining a firm hold on the Pacific coast.
and they wanted to find gold.