It is generally said that reactants react so that they can achieve a lower energy state. Then why does a reversible reaction occur in the first place? Since turning reactants into products increases their energy - an undesirable effect from the point of view of reacting molecules.
First, let's tackle what an irreversible reaction is. Baking a cake, for example, is commonly considered "irreversible." The eggs, flour, milk, etc. which you started with are no longer present in their original forms after the cake has been baked.
Now, can you reconstitute the eggs, flour, milk, etc.? Of course you could take the molecules of the cake and piece them together to make eggs, flour, and milk, but doing so would be a very formidable task. A lot of energy will have to be expended to reconstitute the egg, for example, because eggs are made of protein and with heat (baking) proteins are denatured (lose their original 3D conformation and possibly their linear makeup or amino acid sequence as well).
Another example of an irreversible reaction is combustion of hydrocarbons - i.e. burning gasoline in your car. This reaction is definitely reversible in the long run - it just takes a few million years, a lot of heat, and a lot of pressure for the hydrocarbons to be formed again. But for semantic's sake we say that combustion is irreversible because it's not reversible on a really relevant time scale.
So in general, the difference between irreversible and reversible isn't exactly well defined - i.e. it might be hard to reverse a reaction (turn a cake back into eggs, etc.) or it might take a long time to reverse a reaction, but what's hard? What's long? Tellinging, the IUPAC (International Union of Pure and Applied Chemistry) does not try to define irreversible vs. reversible reaction.
A deeper treatment would involve discussion of equilibrium constants (symbolized by capital K) but I'll let another poster get into this if necessary.
It is generally said that reactants react so that they can achieve a lower energy state. Then why does a reversible reaction occur in the first place?
Good question. Remember that we can always add energy to make an unfavorable reaction proceed. For example, the sodium ion, which is isoelectronic with neon, is stable with a full octet of electrons. However, we can still take away more electrons. It just takes a rather sizable application of energy.
It is generally said that reactants react so that they can achieve a lower energy state.
Here is a slightly more accurate statement: In the absence of non-PV work, the system (closed, at constant pressure) will achieve lower Gibbs energy when a reaction occurs. The less convoluted way of saying this is the second law of thermodynamics applies to chemical reactions.
Then why does a reversible reaction occur in the first place?
The term "reversible reaction" is not exactly what it sounds like. A reaction is called reversible when - at the particular level - both forward and reverse reactions take place. It does not mean that concentrations change in one direction and then suddenly change in the other direction. In fact, the reaction (again, in the absence of non-PV work), always goes toward equilibrium, not away from it. Equilibrium always implies that all reactant and products are present. If you start without product, the reaction will go forward; if you start without reactant, the reaction will go in reverse. If you start with all species present, it depends on the relationship of the reaction quotient Q and the equilibrium constant K.
There are two factors that determine if a process will be spontaneous or not:
Enthalpy- Reactions that give off energy tend to be spontaneous.
Entropy- Entropy is a measure of the randomness or disorder in a system. Generally reactions that increase the randomness of the system are spontaneous.
The Gibbs free energy is a way of combining the entropy and enthalpy of a system into one value.
This might be able to help explain the question.