timeline of a demonKirara is seen in the anime version of InuYasha being partnered with a female maiden named Midoriko who created the Shikon no Tama. She did this in the Heian Period of Japan. The battle took place for seven days and seven nights until she realized it could no longer go on. She sealed the power of the demon Yokai and herself into a jewel, killing both of them. This left Kirara without a human partner. It is estimated that Midoriko and Kirara were companions between 1203-1333. The time period of InuYasha, Sengoku time period, was from the 1400's-1600's. This means Kirara is between 200-400 years old (or way older, we aren't even sure if Kirara was a new demon in the time period of Midoriko or not).
Kirara then was in the hands of the Demon Slayer Tribe for three centuries (300 years). She became Shako's family companion, which is Sango's grandpa. Shako was a great man, he put the human centipede down the well that Kagome later comes out of, and he held onto the jewel as well. He was a strong warrior Once Sango's father was getting older, he decided to pass Kirara down to her at the age of 7 years old because he saw that her skills were growing stronger and stronger and he wanted Kirara there to protect Sango if she needed someone. Once the village is destroyed, Kirara's only partner is Sango. Once they meet up with InuYasha's group, everyone can see how loyal they both are, and they become a larger group together. After the journey is over, and Sango settles down with Miroku, Sango passes on Kirara to her little brother, Kohaku. Kohaku takes Kirara on a journey with him as a Demon Slayer to help protect innocent people and villages from evil demons.
This makes me wonder if people make a pact with Kirara in order to get her to stay or trust the place, or if she willingly joins these people. So, I did some research on why demons stay with humans, and why the listen to them. Someone posted that they believe demons are made because of people, and therefore can understand and get along with humans very well if they wanted to. Other articles expressed that demons are smart and realize that its better to work in groups than alone. I believe that Kirara willingly sided with these humans because she is a passionate and loyal creature. She loves to be around people, to be praised, to play - she's simply a small little kitty with a big attitude at times.