I cant' speak for Apple stores, because the iPhone is the only thing I don't buy from them.
I get mine from AT&T, and they check it during the sale, if it's not right they give me a new one right on the spot.
It's happened to me before. There's no way to beat AT&T for great customer service and friendly assistance.
When I buy via AT&T online, it's the same thing, if I receive a faulty phone, they send a replacement right away, overnight, free shipping. It's why I've stayed with AT&T for 12 years, they have always had the best service and support.