In many shows characters poke their Japanese swords with a soft-looking ball on a stick. It seems that swordsmen in real life did that too. What's the purpose of that? Here's one example from Shaman king E02:
This “fluffy ball” is a standard part of any sword care kit (see the red ball in the picture below). It contains some sort of powder ‒ I believe chalk ‒ that is used gather and bind any fluids on the sword before oiling it again. (That powder acts sort of like a sponge.)
When cleaning your sword you will usually use clean water to remove any big pieces of dirt, then distribute this chalk powder all over your sword by “poking” the “fluffy ball” on the sword and then use a clean cloth to wipe the blade clean before putting the oil on it and distributing it evenly.
The powder (and the ball) is called 'uchiko' and, while it is mildly abrasive, it is used to absorb moisture and acidic grease (from fingers) on the blade. I teach iai, and after each session I will inspect the blade, tsuka etc for any loose items, wipe the blade with very soft paper, tap with the ball to coat both sides and the back of the blade with powder, wipe ONCE with paper to remove the powder, and then oil
As @almost-time said, plus it helps polishing the blade. If you have rough metal, you start with harsh sandpaper (or stone), then go to finer and finer as the metal is more and more polished. (It is work of sword maker on this level). But when it is polished enough you need to use really fine and soft materials. At some level you can improve it only with something soft as a soft chalk or so. Also the metal is still corroding, even if very little so you need to keep it polished. The finer polishing, the less and smaller scratches, the less of influence of weather and so.
Also this make some more bond between the warrior and the sword, as it makes any repeating caring about something. And the sword is soul of the warrior, so the bond is natural part of his mind. You can have servant to clean your clothes and to cook your food, but you take care about your sword personally.