Why is he doing this?

So, I watch an 18 month old. Recently, I’ve been observing his behaviors more, as he is getting more and more personality.

I’ve noticed that if someone else is here during our days together, he whines almost non stop. If it’s just us here, he’s quiet as a mouse.

For the past 6-7 weeks, his older sister (13) has been here periodically, as school is only half the week. When she’s here, she usually just sits on the couch on her phone. She will talk to him and interact if he wants her to. But he whines the whole day if she’s here. Same with his parents, if we’re all sitting around before they leave/after they’re home, he’s whining then, too. He’ll be playing with his toys or books, or whatever he’s normally doing, but whining.

If it’s just us two, he doesn’t make a peep! He’s still getting the same attention either way, doing the same things. Anyone know why this might be? I just thought it was interesting!