Because of making the equestion to be more stable and form the best compound according to it's reactant.
I believe it is b electric energy etc...
I'm guessing water vapour. i can't think of any other gas limited to only hydrogen and oxygen
hope it helps :)