There is also an interesting relation between the second law of thermodynamics and the cosmological principle (which says "the distribution of matter is homogeneous and isotropic on large scales"):
The second law of thermodynamics says that the universe has an entropy gradient in the time dimension, while the cosmological principle says that the universe has no matter gradient in the spatial dimensions.
So together they describe how the universe (space-time) is structured, i.e. on the temporal dimension and the spatial dimensions.
It's also noteworthy that one enjoys the honorific "law" while the other is merely called a "principle". I wonder whether this is just an historical artifact or whether there is some theoretical justification for this distinction. (My intuition is that both are more "principles" [approximate tendencies?] than fundamental laws, since they don't say what's possible/impossible but rather what's statistically likely/unlikely.)
Merely a principle? In science principles are what mathematicians call Axioms. Not proven but taken as true because you have to start somewhere, and it is the only thing that makes sense.
The cosmological principle is the philosophical position that physics works the same everywhere. We haven't done physics experiments across the universe, so we can't call it a law because there is not enough experimental evidence.
You are confusing the cosmological principle with the uniformitarian principle [1]. The cosmological principle concerns the large-scale distribution of matter (not of laws) in the universe, and that is something we arrived at empirically, through observations with large telescopes (galaxies are approximately equally distributed in all directions) and the measurement of the cosmic microwave background. It doesn't get more empirical than that. It's not something like an axiom at all, just an approximate generalization.
> We haven't done physics experiments across the universe, so we can't call it a law because there is not enough experimental evidence.
That's equally true for the second law of thermodynamics: We haven't done physics experiments in the distant past or in the future direction, so we strictly speaking can't be certain that entropy doesn't decrease in the future. But no law is perfectly confirmed anyway (not tested in every conceivable circumstance), so that can't be a criterion for lawhood anyway.
But I already proposed a better criterion: A (fundamental) law says what is possible and impossible, and neither the cosmological principle nor the second law ("law") of thermodynamics do that.
As far as I am aware Uniformitarianism is basically the same thing but covers a bit more since it includes "natural processes" like the results of erosion and is used by Earth science types. Cosmological principle is used at the cosmological scale so they don't bother including planetary natural processes in their axioms.
The second law of thermodynamics says that the universe has an entropy gradient in the time dimension, while the cosmological principle says that the universe has no matter gradient in the spatial dimensions.
So together they describe how the universe (space-time) is structured, i.e. on the temporal dimension and the spatial dimensions.
It's also noteworthy that one enjoys the honorific "law" while the other is merely called a "principle". I wonder whether this is just an historical artifact or whether there is some theoretical justification for this distinction. (My intuition is that both are more "principles" [approximate tendencies?] than fundamental laws, since they don't say what's possible/impossible but rather what's statistically likely/unlikely.)