For decomposition: why does 2KClO3 become ---> 2KCl+3O2?
Like your reaction shows, potassium chlorate, or
Now, a decomposition reaction will leave behind products that are as stable as possible. Heat is used to break the bonds of a compound, after which new bonds will be formed between the elements that formed the original compound.
In the case of potassium chlorate, intense heating will produce a very stable ionic compound, potassium chloride, in solid state.
Solid ionic compounds are very resistant to heat, which means they are more stable; therefore, the formation of such a product will be favored.
Here's how the reaction is set up
Here is a look at the reaction when potassium chlorate decomposes. The crucible contains potassium chlorate and sugar. The decomposition of the potassium chlorate produces a large amount of oxygen gas, which allows the sugar to burn very rapidly. This same reaction is used in fireworks.
video from: Noel Pauller