With the evolution of organisms able to carry out photosynthesis they began converting carbon dioxide to oxygen and using the carbon. Further chemical and biological processes produce hydrocarbons taking hydrogen from water and yielding up net oxygen (usually again as CO2 which is again converted via photosynthesis). The oxygen was always there but in the form of CO2, H2O and mineral oxides.
You must distinguish the absence of free oxygen from the absence of oxygen in general.
Careful about ascribing intent to the initial genetic advance. The microbes didn't choose to produce oxygen nor were they conscious of effect so the "why" of it shouldn't be debated at this level. The oxygen was a byproduct of an advantageous process and also a toxic substance so its production also made oxygen tolerance an advantageous trait. Both together also had the advantage of poisoning competitors more than selves. It is clear such a genetic innovation is a one way street and almost all organisms either adapted or died off... and so here we are.
How was it possible for organisms such as plants or microbes to introduce oxygen to the earth if their DNA template, from which all of their biological features come, contains oxygen? DNA consists of many nucleotides, which contain oxygen ,that are linked on the outer rim of the DNA through the use of phosphate groups, which also contain oxygen. So, if the number one important molecule needed for the survival and procreation of plants and microbes contains oxygen, I'm curious as to how microbes or plants introduced oxygen as a novel agent to the earth.
You are confusing free oxygen, O2, with oxygen in general. There was plenty of oxygen in the early Earth's atmosphere in the form of CO2 and other compounds, plenty of of oxygen in the early Earth's oceans in the form of H2O, and plenty of oxygen in the early Earth's crust in the form of many oxygenated compounds.
oxygen is oxygen whether it is incorporated into molecules within the atmosphere or water in the oceans...perhaps the original question was addressing diatomic oxygen as opposed to oxygen as a novel agent on earth. My apologies if so. As long as no one is under the assumption that microbes or plants introduced oxygen on an oxygen-less planet. =]