I don't think they copy from the remaining key. They reprogram the car itself and bind it to keys. They need all the keys to program their id's into the car system.
Be careful when buying keys from eBay. There're was a recall on keys, and it seems like some of those recalled keys with intermittent problems made it to eBay. I've bought more then one defective key there. On a good side, dealer replaced the defective keys under warranty and reprogrammed everything for free - I didn't tell them I bought them of eBay

. It was pain in the neck though to convince them that there's a problem. Any time they check, the problem was not there, and as soon as I leave, the key would not work. Eventually, the problem manifested itself in their presence.