Because it's expensive to do, and there's tonnes of the stuff available from the air.
It depends on what is in the solution undergoing electrolysis, and on the electrodes.
For example, electrolysis of salt (sodium chloride) solution using copper wire electrodes gives hydrogen gas at the cathode and a green deposit at the anode. Chloride is oxidized to chlorine much faster than the oxygen in water is oxidized to oxygen gas. The chlorine is very reactive and gives copper chloride on the surface of the electrode.
To get oxygen, a fairly-inert electrode is needed, such as graphite (pencil lead may work). And an ionic solute that will not be easily oxidized (such as sulfuric acid or sodium hydrogen sulfate) is needed.
For information that will permit a proper design, rather than guesswork, find a general chemistry textbook and read the chapter on "Electrochemistry."
Who says that it isn't?