One possible way (and I've no idea if this is what they are using here) is to use alternating magnetic strips with opposite polarities.
A magnet has two poles: north and south. Put two bar magnets next to each other, so their fields are in opposite directions
If you are roughly the same distance from each magnet, the fields cancel out, giving no magnetic field. If you are close to one or the other, you get nearly the full effect of the magnetic field of that magnet.
So you make a 'magnet' that actually consists, in essence, of lots of strips of alterating N-S and S-N bar magnets. If you are very close to the magnets (such as the metal clasp of the phone case that is attracted to the magnet to hold it closed), you get the full effect of each magnet, because each point of the metal is very close to one magnet.
As you get further away from the surface, the magnetic field drops off very rapidly because the alternating magnets cancel out. The field becomes negligible on a distance comparable to the width of the magnetic strips.
Many fridge magnets are usually made the same way (if you are familiar with fridge magnets). You can test with them and see how close you have to hold them to a metal surface for them to start to feel a noticable force. They can be pretty strong very close in, such as when you try to pull them off the fridge, and do absolutely nothing just 5mm away from the surface.
So if this is the situation with you phone case, then the magnetic field can be very strong when holding the case closed, and virtually nothing except with a few mm of the magnets. Sticking your card magnetic strip right on the magnet is still going to be bad for it, but as long as you avoid physical contact between the card and the magnet, everything should be fine.