As long as there's a magnetic strip on the back of the card, you can rewrite the data so it can be anything. You can put library card info on your bank card if you wanted to, really. The machines that do it aren't very expensive. It's a lot like recording over a cassette tape... You can have a cassette tape that says "RUN DMC" printed on it, and still have Weird Al actually on the tape.
So I'm assuming the reason the person went to their friend, and not a stranger in the first place, is so when the were using one card to pay for (what looked like) the same exact thing, nobody asked any questions. If they didn't do this numerous times, then nobody would have even known about it, let alone asked any questions to the employee. They were all in on it, if you ask me.
Thinking about it a bit more though, once the stolen card info was used to buy gift cards, the gift cards would have been flagged. So to even further the stupidity I bet the same person brought those cards back to the same store and when they were used "coincidentally" with the same cashier everyone could figure out what was going on.