You are correct Bolton was already planning that. Given Robb's constant blunders, He was certain that North was doomed to be defeated eventually and he didn't plan on being on the losing side. Jaime turning up at Harrenhal gave him the opportunity to pull his master-stroke, getting on the good side of Tywin Lannister.
There would be several reasons for burning however.
- Boltons weren't sure that their plan would work (Re: the Red Wedding). It was still a military plan and thing about military plans is that things rarely go according to the plan. Destroying Stark seat and stronghold would have been great in event of something backfiring and an open war with the Stark.
- Burning Winterfell helped them hide any possible evidence e.g. Dead bodies of all the Ironborn, their stuff, their banners, the bodies of all the witnesses and any survivors who maybe hiding somewhere which would have proved that unlike their story that Ironborn burnt the Castle, it was actually them who did that. (Evidently this failed as they did not take the Crypts into account or Godswood, both of which were used by the survivors).1
- Ramsay is a sadistic monster who just takes pleasure in misery of others. It would have amused him to see the Castle where he was imprisoned and kept as a servant to burn. He is the kind of person who would do it just for the heck of it.
- Stark-Bolton enmity goes back to thousands of years. Both claimed Kingship. Bolton Kings are said to have flayed many Stark Kings and worn their skins as cloaks. Eventually the Starks prevailed. This could be a payback for that defeat which reduced the Boltons from Kings to Lords. In any case, burning Winterfell is in line with the Bolton traditions. Kings Royce II and Royce IV Bolton did the same.
1. Many key logical factors like this one are missing from the Show due to their time and focus constraints. Which in turn gives birth to such questions by Show-fans. In the Books, Ironborn didn't abandon Theon. They were all killed by Ramsay. It was Ser Rodrik Cassel who had Winterfell and Ironborn besieged.
The Boltons attacked Cassel and killed him and his men. So given the size of massacre, it would have been evident something grand had happened. Therefore they needed to destroy the evidence and make it look like it was the Ironborn who did it. In the Show, they didn't show the Wex Pyke either. He was Theon's squire and hid in the God's Woods. He's the main source of how Northmen learnt that Bran was still alive and Boltons were in league with Freys and Lannisters. Plus it was Ramsay who later took it as his personal seat, not Roose Bolton.
Seat of House Bolton remained Dreadfort. Ramsay claimed Winterfell for his own by virtue of his marriage to Arya Stark.