By what mechanisms can molecules with the same empirical formula be so different?
What makes both of those molecules so stable?


This is a fundamental question. Let's start by looking at the following diagram; a chemist would call it a "potential energy diagram." The y-axis shows the energy of a molecule as it travels along the reaction coordinate (x-axis; transforms, reacts) from the starting material on the left to the product on the right.



Notice that there are 3 "potential energy wells" (valleys) in the diagram, these reflect molecules that are stable enough to have a finite lifetime.  Notice too that to move from one well to another, an energy barrier must be surmounted.  

So to return to your question, a molecule would be "kinetically stable" if it was protected on all sides by high energy barriers.  A molecule would be "thermodynamically stable" if its potential energy well was located at an energy that had a very low value on the y-axis.  A molecule that is very stable in a thermodynamic sense, could still be kinetically unstable (and therefore very reactive) if it was surrounded by low energy barriers.  By the same token, a molecule that is very unstable in a thermodynamic sense (exists at a high energy value on the y-axis) could be kinetically stable if it were surrounded by high energy barriers to reduce the likelihood of further reaction.  

Millions of molecules are stable at room temperature, but if you supply enough energy to the system (heat them for example) they can all transform into other compounds.  At room temperature there are high enough energy barriers separating fructose and formaldehyde and they will both be stable in a jar, but under more energetic conditions such transformations might be feasible.