I was thinking along the same lines, as well as perhaps a socket insert (for a deep socket) to hold a nut or bolt in it while working in tight spots.I can see markings on the hex part of it, and can make out a few numbers and letters (46 and N.Y.). A bit of cleaning and close up picture would answer it pretty quick.
I think it is an advertising piece that was given away by a scrap yard.
The magnets given away today feature a plastic body and are almost identical to the one in your picture. My local scrapyard gives these out, and have offered me one on many occasions.
If you clean the magnet body up, I bet that it has a business name on the side.
The hole in the body of this magnet is for use on a key chain.