It helps to understand the process a bit. In the wild, when a snake poops, he will probably never run across that poop again. In the poop will be the infective stages of various parasites he likely picked up from his food. In captivity, your snake is in a confined space. If the poops are not cleaned up promptly, he'll wind up crawling through them and licking them. If he goes in his water dish, he'll also contaminate his only water source. If this happens regularly, he'll keep getting more and more parasites.
Stress can also be a contributing factor. If your snake is stressed because the cage is too small, too crowded, the temperature isn't right, he can't hide, etc. his immune system won't function well. If the immune system does is not functioning well, protozoal parasites and bacteria can start multiplying unchecked causing illness.
Typically, baby snakes have lighter parasite loads. Baby snakes are also not as set in their habits so they are more likely to adapt to a captive environment and will be less stressed by being placed in a cage than an adult. So, if you want to keep a wild snake as a pet it is best to get one as young as possible. If you want to minimize the chances of having to deal with any parasites, get a captive bred snake.
I have three garter snakes. All were wild caught as babies. I make sure that all their poos are cleaned up promptly and that their water dishes stay clean and all are doing very well and growing like weeds. So, as long as you're willing to put in the effort to keep things clean and select appropriate specimens, wild caught snakes can do very well in captivity.
-Alice