When matter comes into contact with anti-matter they mutually annihilate each other, and their masses are instantly turned into radiation according to Einstein’s famous equation, E = mc2, in which E is the energy of the radiation, m is the annihilated mass, and c is the speed of light.The CMB is thermal radiation.
This is where the cosmic background radiation came from; matter / antimatter mutual annhilations.