The leading theory is that X came from Samuel Wilson, a meat packer who supplied meat to U.S. troops in New York and New Jersey who were fighting against British invaders during the War of 1812. Barrels of Wilson’s meat stamped “U.S.” were associated with his nickname.
This gave rise to which phenomenon, which became even more famous during the World Wars.