Some cosmologists think it was produced during an 'inflationary' phase when a new type of field in nature, as yet undetected, decayed. It was originally a field embedded in space itself and co-existing with the universal gravitational field, but for some reason it underwent a phase change that caused it to dump a lot of mass and energy into space as real particles and fields. Prior to inflation, the universe was also expanding and cooling during what some call a primordial Friedman expansion phase, but the reason why the universe was expanding then is locked deeply in the mystery of why our universe exists at all. Something terribly 'asymmetric' happened near 'Time Zero', and we do not have the theories or the data to fully understand what that was.