You are right, it's about stability. However, there's a little more to it!
You see, when two elements react with each other (or compounds), they have different numbers of protons, neutrons and electrons. Because of this, not every reaction goes well accordingly. Sometimes, electrons have to be taken away from one or the other to create a stable chemical reaction.
For instance, the ELEMENT sodium
Chemical reactions occur as a way of "rearranging", the electrons and "bonds". Please see the below link for credit for these words:
However, like this above link states, energy is needed for a chemical reaction to happen. If the elements can create enough energy by themselves to create a reaction, it will automatically happen (such as sodium and water). Reactions DO NOT stop until both elements have bonded successfully or broken down, and have become stable.
Humans can physically create a chemical reaction by, for instance, adding heat or some source of energy directly to them. This helps to excite atoms, and start the reaction.
If an element isn't stable, then it will search out another element or compound to bond to. This will not stop until they are physically stable with each other. Think of it like a truce.
That's the big idea.
Yes, gaining stability is the best way to describe why chemicals react in a short and concise way. Chemical reactions usually end in a more desirable product(s) than the reactants. Or, if neither is favorable, then no reaction occurs. If one side of the reaction is favored, then the reaction will occur in the "favored side"'s direction to achieve stability. If one side is partially favored, then the reaction forms an equilibrium between the products and the reactants, and the chemical reaction does not go to completion.
I hope that helps!