They don't get automatically tied to your account. You get a redemption code, but you can choose "I want this as a gift" when you buy it, but that's just so you can email it to them or whatever and they can be all surprised. Otherwise, you can just give them the code yourself (in game, email, write it down, whatever) and be like, this is a WoW pet code for you.