Firstly, because the Americans burnt York. By burning the White House, the British were demonstrating, “Look, actions have consequences. You burn our towns, we burn what we please in your capital city.”
Second, it was also a poignant lesson in being civilised. The British were demonstrating just as much by what they didn’t burn as what they did. The Americans looted and then burned the whole town of York, individual residences and all. The British only burned American government buildings, and enforced strict discipline to protect private property. The residents of Washington D.C. were surprised and impressed that there was very little crime committed by British troops, and what little there was resulted in immediate hangings of British soldiers. This was Britain’s way of saying “Look. This is how a civilised nation and civilised army behave. We make war with governments, not people. We don’t tolerate our soldiers behaving like bandits.”
This, of course, brought into question the whole American war effort, and what it was really about. Why were we fighting this nation, who were significantly more powerful than us, but still exercised restraint? Who were the villains here?
British restraint also conveyed another lesson, which gets to the final point. The British were saying, “Look, we could hurt you a lot worse if we fancied to do so. Maybe it’s time to stop before we lose all patience and become so inclined?”
The third reason was the irrationality of the whole American venture. The British were really struggling with how to handle what seemed to be an utterly insane policy on our part. Our official pretext for the war was the Orders in Council, with Britain stopping American ships to look for and impress British subjects into Royal Navy service*. However, the British had rescinded the Orders in Council on 16 June 1812, two days before the American declaration of war. Still the Americans attacked. Now, it was two years later, and the Americans were still fighting. The American government was really after Canada, but wouldn’t admit to it, so how was one to negotiate? How do you negotiate with someone who demands that you stop doing something you aren’t doing?
*(Britain did not recognise a person’s right to give up being His Majesty’s subject. However, what is not well known is that service on American ships was the most popular career move for Royal Navy deserters, so much so that the USS Constitution’s crew had more Royal Navy veterans than it did native-born Americans. It was this that prompted the British to target American ships for searches.)
Of course, the British knew we wanted Canada, but that was insane too. The United States of America was at that time a rather insignificant and backwards nation whose entire navy in 1812 consisted of 20 vessels, none heavier than a large frigate, and only 3 of those, 3 lesser frigates, and the rest less than that; whose army at the time consisted of 11,774 troops, 5,000 of them newly recruited; and they were picking a fight with what was one of the two most powerful nations of the day, with over 1000 ships in her navy, 500 on station at any one time, 85 in American waters alone, and a service widely considered the best in the world as well as largest; they had deployed an army three times the size of the whole US Army to the Iberians Peninsula alone, that being hardly the whole of their land forces, and were likewise considered one of the best armies.
Somehow, the American leadership had been mad enough to think that such a contest could possibly have a favourable outcome for them, which was mind boggling in and of itself. But now, two years in, with the Royal Navy firmly in control of the American coastline, the US economy wilting rapidly, half its navy captured or sunk, the rest doing all they could to stay out of British reach, they were still fighting. London was at a loss how to treat such irrationality, so they settled on simply trying to find ways to inflict increasing amounts of pain and demonstrate British power until the Americans finally awoke from their delusional state. Burning the capital was simply one more way to do that, one more chance to say “Are you quite done yet?”
While Madison had finally agreed to start negotiating in January, it hadn’t gotten anywhere, principally because of American fixation on expansion into native lands to the west. As Lord Bathurst put it: “Till I came here, I had no idea of the fixed determination which there is in the heart of every American to extirpate the Indians and appropriate their territory.”
The British still vainly hoped to put in a clause protecting the indigenous peoples from further expansion, thinking that would be a fitting concession to make the Americans learn something from their folly; other than the Duke of Wellington, who quickly grasped that Bathurst was right, and such a thing would never be bargained out of them. So the White House was burned and the fighting carried on.