This is probably an astonishingly naïve question, but what the heck.
Imagine that you’re introduced to someone at work in your office, and you shake their hand. Just after you do, they begin to cough and sneeze, covering their mouth with their hand, cueing you in that they have a cold. A meeting is about to begin so you can’t go wash your hands, and since they’re standing in your office still it’d be pretty obvious and possibly insulting if you grabbed the hand sanitizer off your desk, so as you both walk out of your office you surreptitiously scrub your hands on your pants and head to the meeting.
Does friction transfer the germs from your hands onto your pants instead of your skin, or have you just made things worse by grinding the germs in?