How can steel shavings get magnetized while hole tapping? I was tapping a hole yesterday with my uncle into a piece of soft steel. (A tap cuts threads on the inside of a hole, to accept a machine screw or bolt.) The tap was NOT magnetic! As I finished boring through the soft steel, I noticed that the steel shavings (or chips) were magnetized. I didn’t take a picture of it but one can see the steel shavings in the image below.

I could clearly see that steel shavings were standing perpendicular to the tap itself, not attached by any other means. My question is how does hole tapping (friction) align the domains of the chips?  
I could conceivably imagine that the soft steel is being heated up that loosens the “weakly bound domains” of the soft steel and that maybe, just maybe, they are aligned by the earth’s magnetic field. However, I would guess that the earth’s magnetic field is  too weak over such a short time period. None of this makes any sense to me and therefore, I am asking for help on my question.
 A: I'm not sure what kind of steel you are using, but with stainless steel, many varieties are slightly magnetic. As I recall, when we were building a spectrometer that was very sensitive to magnetic fields, we were careful to use only "austentic stainless steel", which is not magnetic. I think that we paid extra for this feature.
So, I agree with the comment from @lionelbrits, the steel could have already been lightly magnetized but you could only observe it when you cut a very small piece. 
A: Austenitic stainless steel, when subject to forming, will become magnetic since it change into martensitic structure. 
A: The other answers seem to be confusing a material becoming (ferro)magnetic with a material becoming magnetized.
Yes, the non-magnetic stainless steel alloys which would normally be non-magnetic (meaning, they are not attracted to permanent magnets nor can they be magnetized) will become magnetic (meaning that they will now be attracted to permanent magnets, not that they have been magnetized) when cold worked.
The effect in question is not about previously non-ferromagnetic materials becoming magnetic, but about magnetic materials that are not magnetized spontaneously becoming so.  This occurs with any ferromagnetic material.  In fact, it occurs so readily and reliably with your basic mild steel that you can use it as a good indicator for when your drill bit has lost its cutting edge and needs to be sharpened (or replaced).  Not only will it begin to produce chips that are magnetic, the chips will in turn begin to magnetize the drill bit and suddenly the swarf mostly just sticks to the bit.
The same thing happens with taps albeit to a much lesser degree.  Your tap might be getting dull, or you aren’t breaking the chips off before the next thread begins to be cut, or you may need to use more cutting oil.  A small amount of magnetization is probably unavoidable with hand tapping though.  But it also doesn’t really matter that much, or at least not like it does with drill bits.
The reason for this is called tribomagnetization.
That’s right - tribo referring to friction.  You can magnetics things with friction - or more accurately, plastic deformation!
Any ferromagnetic material is made up of microscope magnetic domains.  These domains actually have a pretty strong dependence on the crystal grain structure of a material - the domains within a given grain will generally have all their fields oriented in one direction.  This is caused by weak magnetic anisotropy in the grains.  Or put another way, each grain has a “preferred” or lowest energy direction for magnetic domains to be aligned with, so when then material cools below the Curie temperature, the domains form such that they’re aligned in those directions.
Here is a real micrograph of the crystal grain structure in iron, with the magnetic domains’ north and south poles being shown as red and green coloring:

In unmagnetized materials, these domains cancel each other out and no external magnetic field is observed.
However, when a material is subject to plastic deformation, which can happen at the cutting interface (especially if the tool isn’t as sharp as it could be and is pushing material out of the way as much as it is actually cutting it) or a variety of other metalworking operations, this will cause the crystal grains to become elongated In the detection of the plastic deformation of the material.
This occurs under the surface due to friction as well as larger deformation events.  Using enough lubricant will often prevent anything becoming magnetized at all, but with enough friction or deformation, any magnetic material can become spontaneously magnetized.
The ultimate mechanism behind this is, of course, the grain elongation.  Imagine what will happen to the magnetic domains when their parent grain undergoes plastic deformation:

This distorts the overall orientation of the magnetic domains just as the shape of the crystal grain itself is distorted.  However, due to the directional nature of plastic deformation, all the grains become elongated/stretched in more or less the same direction, and so too are the magnetic domains.  These magnetic domains are no longer in the lowest energy arrangement, and will need to be heated above their curie temperature to fully rearrange themselves in that lowest energy arrangement again.
This highly directional distortion of the magnetic domains disrupts the long range mutual cancelation of their magnetic fields, introducing a small directional “bias” to the previously disordered domains.   A small amount of long-range order has been introduced by the deformation, and a weak but not negligible magnetic field develops as a result, resulting in the spontaneous magnetization of small parts of the material with no magnetizing field needed - only friction and plastic deformation.
This might be difficult to visualize, so imagine a sheet of latex.  Draw a line at a 45 degree angle on the sheet of latex.  Now stretch the sheet at a right angle (45 degrees off the direction of the line).  Is the line still at a 45 degree angle relative to the direction you’re stretching the latex sheet?
No, the line has been stretched with the latex, and rather than being at a 45 degree angle, it is distorted such that it is at an angle more in the direction of the stretching.
Even if you have a bunch of randomly oriented lines, if you stretch that same sheet in a certain direction, all of the orientation of the lines will be distorted more towards that stretch direction, resulting in an overall preference for that direction among the lines of one were to check all the angles and average them.
And so too will the magnetic domains be forced into having a small directional preference by the stretching of plastic deformation, or the rubbing/smearing of grains via friction.
That is why those little shavings suddenly became magnetized enough to stick to the tap.  The magnetic domains can be slightly aligned mechanically, via plastic deformation, resulting in a measurable external magnetic field.  No magnets needed!
