The idea is that eating your boogers introduces manageable amounts of bacteria to your immune system, providing a safe way for it to produce antibodies. There's also the theory that exposure to bacteria reduces the chance of developing allergies.