Where did the CMB originate from? I get that at the beginning of the universe, by the Big Bang theory temperatures and pressures were too high for matter to exist, and even if it did, it would just get annihilated from its antimatter equivalent, thereby releasing electromagnetic radiation (EMR).
However, is this the origin of the CMB? From what I know, before the whole nucleosynthesis and decoupling event, the photons would constantly get scattered and hence the universe was opaque. However, after the temperatures cooled such that neutral atoms could exist, the EMR could propagate out and not get scattered.
However, I read somewhere that it was actually the decoupling event itself which was what originated the CMB. Much like flame tests, or by Bohr's second postulate, when electrons relax into the ground state or just lower energy states, EMR is released. Hence, would the relaxation of these electrons be the source of the CMB?