As others have stated this is normal when you are grouped, and in range, and considering that companions appear to be using the grouping mechanics it would make sense for them to get XP while taking a dirt nap.Well, one of the times she there dead, I noticed, she was still gaining experience.