Hess law is due to enthalpy being a state function, which allows us to calculate the overall change in enthalpy by simply summing up changes for each step of the way, until product is formed. All steps have to proceed at the same temperature and the equations for the individual steps must balance out.