As prefaced in
The Two Towers, the previous instalment of
The Lord of the Rings series, Gandalf has taken Pippin with him because of Pippin’s accidental use of the Seeing Stone; this alerted Sauron to his presence at Isengard. No matter how far Pippin gets from his friends, he thinks of them constantly, showing that however foolhardy he is, he’s above all a caring and loyal companion.