Why is Standard heat of reaction equal to difference between standard heats of formation of products and reactants?
It is the consequence of the Hess's law and that is the consequence of the energy conservation law. Overall it says the enthalpy change does not depend on the path, but only on the start and final point.
Comparing to the real reaction path, you can formally get there also

via the path of conversion reactants to pure elements in their standard form
and then via forming products from those elements.

If the result were not the same, you could create perpetuum mobile switching both states via 2 different paths, gaining the nonzero net energy.