Question: how are endothermic reactions spontaneous?
Answer: An endothermic reaction can only be spontaneous under standard conditions if the increase in molar entropy is sufficient to overcome the endothermicity. If Δ G is negative the reaction is spontaneous. Usually this equation is dominated by enthalpy changes but in rare cases entropy can determine spontaneity.