Role of solar wind turbulence in the coupling of the solar wind to the Earth's magnetosphere