After the United States gained independence through the War of Independence, it got rid of British colonial rule and its strength expanded. However, the United Kingdom does not want to see the United States grow stronger and suppress the United States in terms of trade, politics, and military affairs.
Thus, in June 1812, the “Second US-British War” broke out. The British army captured Washington in August 1814. The White House was burned at the time by the British army (half of which were Canadian militia, when Canada had not yet obtained autonomy).
After the war (1817), it was necessary to paint the walls with white paint, hence the name.