From Grant, by Ron Chernow (Penguin, 2018), Kindle pp. 49-51:
THE MEXICAN WAR did more than just educate Grant in strategy and tactics, it also tutored him in the manifold ways wars are shot through with political calculations. “The Mexican war was a political war,” he would observe, “and the administration conducting it desired to make party capital out of it.” Monterrey’s fall made Zachary Taylor the darling of the Whig press. When this was followed by Whig victories in the November elections, giving the opposition party control of both houses of Congress, President Polk grew leery of Taylor as a Whig rival for president. In a Machiavellian maneuver, he decided to divest Taylor of most of his troops and replace him with Winfield Scott, a Whig lacking Taylor’s brand of popular charisma.
In high-handed fashion, Polk dispatched Scott to Texas without notifying Taylor of what was afoot. When Scott arrived in Point Isabel after Christmas, he informed Taylor by letter that he had taken over the Army of Invasion and was radically revamping the war strategy. …
Grant was with Taylor when he received the shocking news of his demotion and never forgot his hero’s befuddled reaction. … This early experience made Grant tend to view war as a hard-luck saga of talented, professional soldiers betrayed by political opportunists plotting back in Washington.
Between the founding era of the Republic and the Civil War, no figure embodied the American military more splendidly than Winfield Scott, who was promoted to brevet major general by the War of 1812. Straddling two eras, he would serve under presidents as far apart as James Madison and Abraham Lincoln. Mocked as “Old Fuss and Feathers” behind his back, he had never seen a parade ground he didn’t long to tread or a uniform he didn’t wish to wear. With his enormous height, wavy hair, and ample flesh, he loved to flash medals, flaunt plumed hats, and preen before mirrors, a vanity that made him susceptible to flattery. Grant noted how Scott sent word ahead to commanders of the precise hour he planned to arrive. “This was done so that all the army might be under arms to salute their chief as he passed. On these occasions he wore his dress uniform, cocked hat, aiguilletes, sabre and spurs.” Such vainglory was so alien to Grant that it is sometimes hard to say whether he modeled himself after Zachary Taylor or in opposition to Winfield Scott.
For all that, Grant credited Scott with a brilliantly resourceful mind and strategic daring. To travel from Veracruz to the capital, an army of twelve thousand would quit a secure supply base, traverse 250 miles of mountainous terrain, then face a much larger and well-fortified enemy in a populous capital. To do this, Scott assembled a first-rate team of bright junior officers, including Pierre G. T. Beauregard and George B. McClellan and a rising star on the engineering staff, Robert E. Lee. Throw in a host of other officers who later reappeared in the Civil War—Joseph Johnston, John Pemberton, James Longstreet, Winfield Scott Hancock, Albert Sidney Johnston, Joseph Hooker, George Thomas, Braxton Bragg, and George Gordon Meade—and the Mexican War seemed a dress rehearsal for the later conflict. With a retentive memory for faces and events, Grant accumulated a detailed inventory of knowledge about these varied men that he drew on later.