Left to its own devices in a modern America, a human will typically become obese from overeating and eating unhealthy foods (guess how I know!). That doesn't make this behavior adaptive. Humans didn't evolve under an environment of plenty, so their behavior in such an environment does not necessarily maximize survival value. Ditto for an environment where parents don't pay attention to what their infants put in their mouths.
In summary, it's a long, long shot to claim that babies being willing to eat anything constitutes evidence that bacterial exposure is beneficial.