Is AppleCare Transferable on iPhones?
AppleCare protects the item and is fully transferable to any new owner of that existing phone. Also, the full terms and conditions are at apple.com/legal in case your country specific details differ from the USA. 

You can also cancel AppleCare for a pro-rated refund at any time so if after three months, you wanted to sell your iPhone 5 to someone that didn't want to pay for AppleCare coverage - you could get the majority of the cost back.

I agree with what you reported, you can't in general just move AppleCare to another device whether it's the same owner or a different owner. The move in that case is to get a refund in my opinion. The power to decide is in your friend's choice - sell the iPhone 5 with coverage if that raises the sale price (or value to the next owner) or get a refund which will defray all but the few months of coverage that has been used when buying coverage for the iPhone 5s.