Hi Ahmad! For this question, you should be familiar with Hess' Law, and the corresponding equation; ΔH°rxn=
n(ΔH of the products)-n(ΔΗ of the reactants), where n is the number of moles. We assume all substances in their elemental form have a ΔH of exactly 0(an arbitrary definition that allows us to put numbers to reactions--which is quite useful!), so because both products are in their elemental form, the ΔH of the products is 0. Thus, we have 593.6 kj = 0-2(ΔΗH2O), and we can solve for the missing variable. We end up with -296.8 kj, which is quite close to the accepted value at room temperature(≈-292.7 kj, https://atct.anl.gov/Thermochemical%20Data/version%201.118/species/?species_number=986).
The reason for the disparity could be a number of different things that were not discussed in the question, because the value you are really measuring is how favorable it is for that reaction to occur. In other words, since all atoms want to be in their lowest energy state, it is much more favorable for water to form from hydrogen and oxygen(releasing 593 kj of energy per mole produced) than for it to spontaneously decompose(which would require the water molecule to gain 593 kj of energy per mole).
I hope this helps!