Just to add:
The decrease in mass density due to the global expansion is the reason for the dropping of the temperature. Once stable neutral atoms could form, this dropped the optical density of the universe, ie. the measure of how far the average photon could travel.
Since the release of the CMB photons, the expansion is doubly responsible for the decrease in the energy associated with these photons: to the cube power due to the increase in volume and then up to the fourth power due to the expansion introducing redshift to the photon. This is reflected in the temperature of the CMB now vs. the temperature when released.
I will come back to this, but first:
My comment on the "finite and unbounded" discussion as it pertains to General Relativity, at least the Wiki version on Physical Cosmology. Einstein's model, with the Cosmological Constant, was meant to define a static universe. Even his static model with the CC was unstable due to small perturbations, and would eventually either expand or contract. But that aside, his model described gravity as a geometric property of space and time, and described space as finite but unbounded, using an analogy of the surface of a sphere.
Let me try to put that analogy in my own words to test my understanding, and to see what comments some of you will have about my view of it.
There are various shapes that the surface of a sphere can take on, and the actual "shape", the topography of the universe so to speak, is a function of the true value of the cosmological constant. For simplicity's sake, if we invoke a slightly open curved shape, it would correspond with what scientists now think.
I've seen a graphic of this shape, sort of like a saddle, and the idea is that if you take a big enough portion of the universe in three dimensions, all of the paths from one point to any other point in that patch of space follow the curve of the saddle. That means if you compare the actual distance between any two points to a straight line, the actual distance is greater. The fact of the curved topology is that going straight isn't an option because you have to follow the saddle shape when you move. You can only take a path between two points that falls on the saddle's surface.
I have to keep reminding myself, and this is a characteristic of general relativity if I understand the curved surface as it relates to any three dimensional patch of space, no matter how big or how small, natural motion occurs along the general curved topography applicable to that patch of space, and not in straight lines.
So the debate about finite and unbounded refers to the general relativity concept of "shape", and the saddle is the current view of the overall shape of the universe. It is finite because it has dimensions based on a beginning and on subsequent inflation/expansion over ~13.7 billion years, and it is unbounded as if it was a surface of a sphere that has no edges.
Is that OK, and give me some layman slack on this, lol.