Just because a character has a player attached doesn't mean it deserves any more or any less share of the XP for the Giant it helped kill.
If the player is running the PC and helping kill the giant, sure the PC gets his fair share of the xp. MAYBE if the player is NOT there but the player authorizes someone else to run his PC for him, then the PC still earns xp. If the PC is considered to be "watching the horses" while the other PC's delve into the dungeon because the PC's player is absent - not a chance of xp at all, which was what the OP was suggesting, yes? The PC earning xp even though the PC is not actually doing anything, assumedly on the principle that the PC's all NEED to stay very close in xp/levels.
NPC's with the party earn xp just as the PC's do. But at any time, any place, for any reason (most especially including the reason of "because I want it to be so") then I, as DM, will assign whatever xp total or whatever level regardless of xp as I see fit to that NPC. Just because the NPC "plays by PC rules" for earning xp while with the PC's doesn't mean that it ceases to be an NPC in any other way/shape/form. When I
want an NPC to level up - he does. When an NPC accumulates enough actual xp from adventuring with PC's to level up - he does. Rules, requirements, procedures regarding xp are not the same for PC's and NPC's alike.
The xp awards really are a system meant just for the PC's, and so, for practical purposes, xp is really meant just for the PLAYERS as a reward and control mechanism for their participation. Given the suggested use of xp loss as punishment for alignment transgressions, or disruptive player behavior points its purpose even more at being intended as a player-participation tool.
Just realized that I should state that I see all this in terms of 1E rules. Other editions will, of course, vary but I personally STILL assign 1E ideals to later edtions. This probably invalidates my opinion for a lot of people.