It’s all about electrochemical potential. Adding or removing electrons from the outer shell of an atom involves a fair amount of energy, either being released or stored. Depending on the atom, they either want their shell filled or emptied. Noble gases have the same number of protons as a filled shell, so they are very stable. Why electron shells exist is a whole other matter.
Water is kind of like ash. Technically full combustion of any hydrocarbon outputs CO2 and Water. Since water isn’t a greenhouse gas it’s not mentioned when discussing combustion usually.