The Ganges water flows directly from the lotus feet of Viṣṇu, and its course runs from the highest planet of the universe down to the lowest. The sages came down from Satyaloka by taking advantage of the flowing water, a process of transportation made possible by the power of mystic yoga. If a river flows thousands and thousands of miles, a perfect yogī can at once transport himself from one place to another simply by dipping in its water. The Ganges is the only celestial river which flows throughout the universe, and great sages travel all over the universe via this sacred river. The statement that their hair was wet indicates that it was directly moistened by the water originating from the lotus feet of Viṣṇu (the Ganges). Whoever touches the water of the Ganges to his head surely touches the lotus feet of the Lord directly and can become free from all effects of sinful acts. If after taking a bath in the Ganges or being washed of all sins, a man guards himself against committing further sinful acts, then certainly he is delivered. But if he again takes up sinful activities, his bath in the Ganges is as good as that of the elephant, who nicely takes his bath in a river but later spoils the whole thing by covering himself with dust on the land.
Reference:-SB 3.8.5