So that buggered lots of scientists
Yes, we now know that at .9C, the speed of light woudl be constant in all directions, but that wasn't immediately obvious to the scientists back then. They hadn't had that concept drilled into them in highschool physics =)
So they had to sit down and say "okay, how can we make these equations work. They are doing stupid things that don't make sense."
And what they came up with was called the Lorentz boost.
If you took the velocity of the observer, you could apply a corrective factor to the time and positions in Maxwell's Equations. This gave you a consistent result no matter what frame you were in.
So this made people happy because it meant there was still some magical reference frame where light traveled according to Maxwell's original equations, but still worked in all reference frames.
But it made people sad because, frankly, the modified equations are ugly.
Maxwell's equations are pure to the point of brilliance. With the Lorenz boost applied, they're just this murky ugly beast to make undergrad student slog through on exams.
This was the environment Einstein came into.
Einstein had a brutally brilliant assumption: The laws of physics were the same for all non-accelerating reference frames. There should not be a Lorentz boost that was frame-dependent.
And so he made the crazy declaration: time and space itself is relative to the observer.
He packed the Lorentz boost into time and space itself.
This ends up describing everything exactly the same as before, except now we pay some funny prices. If two observers are in different reference frames, they simply do not agree on how time and space are stretched.
He argued there is no universal causality. Two observers can argue that two events happend in different orders, because their mapping of space and time is different.
While Maxwell's equations with a lorentz boost argues that light travels through time differently, Einstein argued that everything traveled through time differently.
That a clock, flown around the planet a few dozen times, will have ticked slower.
And, when the experiments were finally done, it turned out he was right.