In electrolysis, why does each atom wait to turn into gas until they reach a particular electrode?
$\ce{H2O}$ is not simply split apart by electricity, as you say. No ! What happens on one electrode is not related to what happens to the second electrode. Let's start by discussing what is happening on the negative electrode, the cathode.
The negative electrode behaves as if it contains plenty of electrons ready to react with anything able to do it. It could be positive ions. But in neutral solutions it may be water that does react with these electrons, according to :
$$\ce{2 H2O  +  2 e^- -&gt; H2 + 2 OH-}$$ So, some bubbles of gaseous Hydrogen $\ce{H2}$ are produced on the cathode and the solution become basic because of the appearance of $\ce{OH-}$ ions in solution.
On the other electrode, the anode, which is the positive electrode, something must occur to produce electrons. Once again, it is water that manages to be decomposed in order to produce electrons. It is done this way : $$\ce{ 2 H2O -&gt; 4 H+ + O2 + 4 e-}$$ Here some oxygen bubbles are produced on the anode. And the solution becomes acidic, if it was neutral in the beginning.
A last consequence of these chemical transformations is the fact that the solution becomes acidic at the anode and basic at the cathode. Of course, by simple mixing the $\ce{H+}$ and the $\ce{OH-}$ ions neutralize one another, producing water. So the only visible effect of the electrolysis is the production of $\ce{H2}$ at the cathode and $\ce{O2}$ at the anode, as if $\ce{H2O}$ has been split. Only &quot;as if&quot;.