From Wikipedia,
“Historically, the transformations were the result of attempts by Lorentz and others to explain how the speed of light was observed to be independent of the reference frame, and to understand the symmetries of the laws of electromagnetism.”
The null results from Michelson-Morley’s experiment in 1887 led to the belief that the speed of light is the same in all inertial frames. For example, light is observed to have the same speed, c = 3 x 108 meters/second, relative to the earth and also to the sun, even when earth is moving at a speed 3 x 104 meters/second relative to the sun.
But, Earth and Sun, together as a system on a larger scale, are moving at the same velocity with respect to light. The anomaly, therefore, is local and not universal. Logically, it means that space and time characteristics, which determine the speed of light, maintain a constant relationship on a universal basis, while their individual characteristics may vary locally.
We know that the space and time characteristics are intrinsic to substance. As summarized in The Universal Frame of Reference, space is tied to the extents of substance, and time is tied to the duration of substance. Therefore, space and time are tied to the density of substance. As density changes, the space-time characteristics change accordingly, but in a constant relationship.
Mathematically, this constant space-time relationship leads to the Lorentz transformation (see Special Relativity explained at Khan Academy).
Lorentz transformation, however, transforms space and time coordinates from one local frame to another, considering that the speed of light is the same in both frames of references. The mathematics provides the following relationships.

When c is infinite, βc reduces to v, β reduces to 0, and γ reduces to 1. Lorentz transformation reduces to Galilean transformation. This means that Galilean transformation is valid in the universal frame of reference, and our task is to scale the motion in the local frame of reference to motion in the universal frame of reference. This is done by β. The resulting change in γ is the correction factor that needs to be applied to the Galilean transformation.
If v = 3 x 104 m/s is the velocity of the Earth relative to the Sun, we are scaling it down by the speed of light, c = 3 x 108 m/s in the universal frame of reference by β = v/c = 10-4. For this value of β, we may calculate γ = 1 + 5 x 10-9.
This means that a local velocity of v = 3 x 104 m/s provides a small correction factor of 5 x 10-9 to the Galilean transformation.
It is to be understood that a velocity differential in free space equates to a density differential (see The Universal Frame of Reference). Therefore, we may interpret the above numbers to mean that an increase in velocity of v = 3 x 104 m/s may equate to decrease in density by a factor of 5 x 10-9.
It should be noted that Lorentz transformation provides a very general correction for the material domain, and it may not account for finer details, such as, the Earth’s velocity is not linear relative to the Sun. In the material domain v is much smaller than c because the inertia (density), in general, is very high.
.