Rhinotillexis and mucophagy may help expose the immune system to weakened versions of pathogens. Depending on how well you clean your hands before and after, however, it may introduce new things into the nose, or introduce things in your nose to the people you shake hands with. There is also a minor risk of injury, mostly nosebleed.
Just wanted to say that this sort of interaction is important. I'm glad people question what they're taught and I'm glad that you have responded with a reasonable answer that explains the why behind this social norm. I think the reasoning behind social norms are really important to understand. Not only because they might help reinforce a positive behavior, but we might also come up with a better solution when we discuss it.
Its possible that nose picking and similar behaviors by kids are important for helping build the immune system.