Why is my friend's daughter calmer and more respectful around me than her own mother?

I started helping out a friend of mine with her 7 year old daughter last summer to help her get out of the house more while mom took care of the baby. I noticed after a while that when the 7 year old is with me that she's super calm and respectful. She's not irritating at all. But whenever we were at her house around her mom, she was always getting in trouble over the smallest things and getting yelled at. She used to play hit me a lot whenever we were around her mom. But when she's with me she's super calm now. Is that normal for kids? Or is it because I set boundaries with her and I'm very gentle with her compared to her mom?
Why is my friend's daughter calmer and more respectful around me than her own mother?
Post Opinion