The following is a piece of an episode of MacGyver, complete with a FizziksGuy voiceover explaining a fascinating effect of physical stress of ferro materials, called the "Inverse Magnetostrictive Effect" or "Villari Effect." Although understanding this process requires very abstract thought, I highly recommend it for those of you planning to pursue E + M further into the future. It is a fascinating subject!
Its important to understand that the process you saw MacGyver use does not necessarily form magnets for all conveniently placed metal rods. MacGyver must have found himself a nearly pure rod of Iron; it is important to also understand that Iron has some RIDICULOUS reactions to magnetic fields and has very particular properties.
What this means is that banging metal on your driveway does not a magnet make. In fact, Nickel's tendency to magnetize significantly decreases under physical stress! Isn't that Iron-ic? What this means is that the actual atomic structures of individual metals determine their reaction to stress (that one goes out to all you chemistry dudes). In all my digging, it seems that Magnetostrictive material science is becoming outdated, but I gained some very valuable insight into how my Piezo Electric Violin Pickup works, the processes are not so different.
On a side note, the JWST has finally moved into Phase C (Final Design and Fabrication) and although NASA has begun hammering out strict budget rearrangements, the JWST remains on schedule!