Contaminated food and water are common causes of gut infection. Your baby is suffering from gastroenteritis
. It is possible that the baby acquire infection due to improper hygiene. Proper handwashing is mandatory before giving feeds to your baby. Personal hygiene is equally important. After 5 months of age, babies start mouthing and they will lick or suck anything that is given to them. So that it quite natural and expected. When your baby grows up and sucking still persists beyond 4 years of age, especially thumb sucking
, you need to address this problem seriously. But not at the moment. It may be part of play therapy in children and they can be left alone. Until then, keep a watch on your baby of the objects that come in his hand and make sure only clean items are handed over for the purpose of playing.