All perfect praise be to Allah, The Lord of the Worlds. I testify that there is none worthy of worship except Allah, and that Muhammad is His slave and Messenger.
The Hadeeth that you referred to with the wording that you mentioned was reported by Al-Bukhaari and Muslim and narrated by Abu Sa'eed Al-Khudri and not by Abu Hurayrah, as you mentioned.
Abu Sa'eed al-Khudri narrated: “The Prophet forbade tipping up the mouth of the water-skin, and then drinking from its mouth directly.” [Muslim]
Al-Bukhaari reported the Hadeeth from Abu Hurayrah who said: “The Prophet forbade drinking directly from the mouth of a leather container or of a water-skin.”
The meaning of “forbade tipping up the mouth” is the prohibition of turning its mouth (mouth of the water-skin) to the outside and then drinking directly from it, as was reported in the version narrated by Muslim.
The scholars mentioned three reasons for this prohibition:
1- There may be something harmful in the big leather containers or water-skins, such as insects, a scorpion, or a snake, or a jinni. So, if someone drinks from it directly, he will be harmed by that thing. The Hadeeth reported by Al-Haakim in his book Al-Mustadrak and by Ibn Maajah in his book As-Sunan states that Ibn ‘Abbas narrated: “The Prophet forbade tipping up water-skins. After the Prophet had forbidden that, a man got up at night and tipped up a water skin, and a snake fell out of it onto him.”
Ibn Abu Shaybah, also reported in his book Al-Musannaf that Abu Sa'eed Al-Khudri, said: “A man drank (directly) from the water-skin, and there was a jinni in its inside which went into the man; so the Prophet forbade tipping up water-skins.”
Shaykh Ibn 'Uthaymeen said: “The wisdom behind this is that the water in the past was not that clean water, and when it was placed in a big leather containers or a water-skins, there were harmful things in it, like pieces of wood, insects, and other harmful things. This is a fact known to those who used to use these containers before. This is the reason why the Prophet forbade it [..] This does not include drinking from the faucet or from the jars in which water is stored, because these are known and clean, and it is like drinking from pots.” [End of quote]
2- Drinking directly from the mouth of the water-skin or leather containers continuously leads to a change in its smell, and over time it will have a very unpleasant smell. This is proven by the narration reported by Al-Haakim in his book Al-Mustadrak on the authority of 'Aa'ishah who said: “The Prophet forbade drinking from the mouth of water-skins because it gives it an unpleasant smell.” [Al-Haakim classified it as authentic, and Ath-Thahabi agreed with him]
3- Water pouring out. This was mentioned by Ibn Hajar in his book Fat-h Al-Baari, as he said: “If a person drinks from the mouth of the water-skin, then the water may pour on him more than his need, and thus one might choke with water or that the water may fall on his clothes. Ibn Al-'Arabi said: ‘One of these three reasons is sufficient to prove that it is disliked (to drink from the mouth of the container). This becomes even more confirmed if the three reasons are combined together.’” [End of quote]
In our view, the ruling includes every container that has an open mouth where the drink that is inside it cannot be seen, such as the open jar and so on, because it is possible that something might have entered it without the person knowing. The same thing applies to every vessel (or container) from which many people drink, and it is likely that its smell might change.
Allah knows best.