The problem is that you are confusing "purchasing", "replacing" and "repair".
You put down your money and "purchased" a new phone and took it home.
That phone had (I assume) some kind of problem and you took it back to the store. If you took it to AT&T or the Apple Store and they decided to "replace" the phone, you would receive a new phone, with all accessories, in exchange for your defective phone.
However, here is where you seem to be confused, if the iPhone is taken for "repair", instead of taking your phone and keeping it for several days to remove the defective part and replacing it, Apple instead keeps a stock of phones they can exchange for your defective phone and you are not without. When I was in the Army, we did this with tanks and called them "floaters", it kept the tank unit combat ready instead of having a tank in repair for an extended period of time. Back to the iPhones, the replacement may or may not be a "referbished" unit, there is no way to tell. They in turn take your phone back to the factory and perform the repair and place it into the "repair/replacement" stock for another person needing a repair.
Message was edited by: J.K. ROFLing
<Edited by Host>