Many people swear that after handling garlic and onion, rubbing your hands on stainless steel will remove the odor. I believe it works, as do many colleagues. Alton Brown swears all you need do is rub your hand along your knife.
But another respected figure in the culinary science field, Bob Wolke, author of What Einstein Told his Cook, said it didn’t work when he tried it. There does not seem to be hard science for or against it, and anecdotally, many people (including me!) believe it works. As for the why and how: I will defer on this one to the all-powerful and mysterious Kitchen Wizard, who guides all magical and inexplicable happenings in my kitchen and yours.