The obvious solution to this problem is just not taking random pills.
Also I don't see how this solves anything, just because a pill "looks" like another doesn't mean it is that, it could still be anything.
It's harm reduction. Obvious? That's not how the real world works I'm afraid. Where did I claim this "solved" the problem?
Chances are if it looks the same and has other matching properties like press qualities (edge sharpness, density, etc), taste, smell, waxiness, and you’re in the same general location, and around the same time, it’s probably the same batch of pills.
Knock-offs tend to turn up later, be of inferior quality physically, and have worse reviews online and in the clubs / social circles.