system
Given the following post, respond as if you're commenting on Reddit:
human
ELI5: why does putting a credit card in a plastic bag make it more likely to swipe without an error?

Working in retail it's just one of the things you learn. If a credit/debit card will not swipe, put I in a plastic bag and try swiping again. Works 90% of the time but I have no idea why.
gpt
This type of card uses a magnetic stripe to indicate the card information. On the card, you have magnetic particle that vary in strength along the length of the card. Say for example, that at a particular spot on the stripe, you can have either some magnetic particles (1) or none at all (0). By reading the stripe sequentially, you get a binary number that represents the information of the card.

Now most of the time when a card doesn't work very well it's because, after a lot of use, the magnetic field will start to "bleed" to their neighboring sections. 0s will start to look like 1s because they "absorbed" some of their magnetism.

From our study of magnetism, we know that a magnetic field's power decreases exponentially with the distance. We also know that we want 0s to look more like 0s (less magnetism), so what we need to do is move the card a bit further away from the sensor. Putting the card in a bag or inside a folder paper sheet is most of the time enough to get that effect.