Sounds like just a childish prank. Clearly, a couple of baggage screeners had a good laugh at your expense and wanted you to know that they had seen your stash. (I guess you can be thankful that it was back-room screening, not the kind that happens in the public terminal, much less in your presence.)
I would use gloves to remove the magazine from your bag before recycling it.