The reason that Rikki-Tikki-Tavi is living with humans in a bungalow instead of with the rest of his mongoose family is narrated in paragraph three of Kipling's enjoyable story. A summer monsoon and following flood washed Rikki out of his burrow and carried him away. He was soaking wet and rather dead looking when the young boy in the story found him.
One day, a high summer flood washed him out of the burrow where he lived with his father and mother, and carried him, kicking and clucking, down a roadside ditch. He found a little wisp of grass floating there, and clung to it till he lost his senses.
The mother of the family decided to dry him off and nurse him back to health.
They took him into the house, and a big man picked him up between his finger and thumb and said he was not dead but half choked. So they wrapped him in cotton wool, and warmed him over a little fire, and he opened his eyes and sneezed.
The narrator of the story then proceeds to tell the reader that a mongoose is a naturally super curious animal. With that in mind, alongside the natural kindness that the family has already shown Rikki, he decides to stay at the bungalow for awhile. It's a funny bit of narration to think that a mongoose chooses to stay somewhere, because he thinks it is "cool."
"There are more things to find out about in this house," he said to himself, "than all my family could find out in all their lives. I shall certainly stay and find out."