Why can endothermic reactions occur spontaneously if the entropy change is negative for a cooling process?

A Level