Hydrogen is the most abundant element in the universe. Oxygen is much rarer, but more reactive.
Do these two elements simply mate out there in space?
I have no idea. But every compound requires a joining somewhere at some time.