There are two factors that contribute to thermodynamic favorability. In general, systems will prefer to reduce their potential energy (enthalpy) and increase their disorder (entropy). Often times, these two goals are in conflict. Even if a process causes a system to raise its potential energy, this disfavored increase in enthalpy can be offset by an increase in the entropy of the system.
For example, when water melts, it moves toward a higher energy state (there are more hydrogen bonding interactions in ice than in liquid water and these interactions are stronger in ice) but it becomes much more disordered. Therefore, at room temperature, the transition from ice to liquid water is thermodynamically favored despite the positive ΔH associated with the process.
ΔH is just one factor that determines thermodynamic favorability, but it is not the only factor. Ultimately, it is ΔG that determines thermodynamic favorability (at least, under conditions of constant temperature and pressure).