Tapping gives the brushes a shoogle. If the spring pressure is week due to the brush being worn or if it's been unused for a period then sometimes a tap is all it'll take to "resynchronise"! Same can be done for many a motor or alternator........but on some modern starter motors the magnets can be dislodged, can't remember the type?
Good tool the hammer, I love it.
