Scientists believed that the ether flowed like a wind or a river. As such, it would affect moving objects in measurable ways.
Imagine twin athletes on a pier by a river. One swims 50 meters across the river, and the other swims 50 meters upstream. Who will win the race back to the pier?
The first swimmer must contend with the current in both directions. The second swimmer fights the current only in the first leg, but the faster return trip never makes up for her loss. She will always lose the race back to the pier.
Michelson and Morley's experiment was a race not between two swimmers but between two pulses of light. They hypothesized that the ether would affect the pulses like the river affects the swimmers.