What Hubble's law says is that the galaxies are drawing apart now. So run time backward. Things that are drawing apart were closer together in the past.
As the spacing shrinks, the same contents go into a smaller space, and the density rises. Go far enough back and there is no limit to how packed it gets.
Packing it also heats it. A gas warms when it is squeezed. So does light: as space contracts the wavelength contracts with it, and each quantum of light carries more energy.
The temperature rises in inverse proportion to the size of space. Writing the present size as and calling it , we have . The further back, the smaller and the larger . The universe began hot.
While it is hotter than a few thousand degrees, an atom cannot hold on to an electron. Protons and electrons fly about separately.
Free electrons scatter light readily. The light cannot travel straight; it goes a little way and changes direction. Inside a universe in that state, nothing distant can be seen.
As the expansion brings the temperature down to around K, the electrons are captured by the protons and become neutral hydrogen. There is nothing left to scatter off.
From that moment the light travels straight. This is called recombination, or the clearing. The background radiation arriving now is the light that scattered for the last time then. No telescope can see past it.
The light at the clearing was the light of something at K: bright, and including wavelengths the eye can see.
Space went on expanding afterward. When space stretches, so does the wavelength of the light travelling through it, by the same factor. Expansion stretches light.
Between the clearing and now, space has grown by about a factor of ; that is, . The wavelength is stretched times and the temperature falls to a th of what it was.
divided by is about . And in fact, whichever way one points, light of a K glow arrives. What was visible light at the clearing reaches us as microwaves.
Whichever direction it is measured in, this light has almost the same temperature. The differences run to about . Seen on the large scale, the universe is the same everywhere.
It is not perfectly uniform, though. There are patches slightly warmer and patches slightly cooler. Draw it with the temperature difference exaggerated and a pattern of blotches appears.
Those blotches are the density variations as they stood at the clearing. Where it is denser, gravity is stronger and pulls in more; where it is thinner, it thins further. The difference widens with time.
So these blotches are the seeds of the galaxies and the clusters. Had it been perfectly uniform, nothing could have gathered anywhere. The structure we see exists because there was a difference of one part in .