We know from observations that light moves at a constant speed, even when the observer is moving near the speed of light, and we know that this observation is true regardless of your frame of reference.
In order for physics to remain consistent while accounting for the constant speed of light, other things need to flex between the two reference frames: namely, time (time dilation) and length (Lorentz contraction).