Texas anexed itself to the U.S.
We took California from Mexico.
Sometimes is good to recognize that some of the things nations do are not always kosher.
What the U.S. didn't do, was failing to give either Texas or California, or its citizens, a voice in their government.
Oh --- as though Mexico was giving them a voice? You act like the USA is occupying Texas and California -- when did have you ever heard of a single uprising by the people in Texas because they wanted to reunite with Mexico? Even today, most Mexicans want out of Mexico -- they should state by state declare themselves independent from Mexico and then try to join the USA --- but they might have to fight the army of Mexico. I guess it's easier packing up your bags and fleeing.