Depends what you call XC. If it’s anything other than DH, then plenty of stuff I do I’ll wear knee pads for on a trail bike (okay AM full sus and AM/XC-ish hard tail). Mainly because I may blast at speed at a steep rocky & rooty descent and can (and have) come off. Knees are expensive to mess up.
Though mainly I just wear them to keep my knees warm 😀
If it’s a less “gnarly” ride, night ride or proper XC (what the hell is proper XC anyway?), then the pads are left behind. Usually because it’s a longer and/or faster ride with much pedalling and pads get in the way.
DH, pads of course. Maybe even full stormtrooper.
Then you’ve got the question of BPW… 😉