To give you specific terms to research on, in cosmology this is called the "horizon problem" or the "homogeneity problem," basically put as "Why is the stuff over there so similar to the stuff right here when they're so far away? They ought to be causally disconnected by distance!"
The answer to this in the early universe is called inflation, which you can tag onto Alan Guth around 1981 or so. It involves spacetime itself stretching. Originally, everything was nearby and so it was all evened out -- about the same temperature, density, and so on, then it just gets pulled apart and "writ large" in a twinkling.