A better question might be "is infection inevitable?"...
Now, I would say having an infected beer is not inevitable. If a person has good information when they start brewing, has a good process from the beginning and pays attention to detail - you absolutely can brew beer and never have an infection...... at least an infection that is significant enough to force you to dump a beer.
I do think most people run across infection(s) at some point, but I could see how people could avoid it if they were on top of this right from the beginning with good cleaning and sanitation practices.
Personally, most of my "dumpers" were the result of four things:
1.) Water - not knowing the impact of chlorine and very high bicarbonate levels on my beers. Nothing like a harsh/astringent/bandaid flavored IPA...
2.) Yeast Health - not knowing the importance of healthy yeast starters. Thinking that 6 month old pack of yeast is just fine to pitch directly. Not knowing the even greater significance in lagers.
3.) Experimentation - just brewing something that was a bad combination of ingredients.
4.) High Fermentation Temps - Thinking that it is just fine to chill your beer under 80 degrees and set it in a room that is in the mid 70's. Sending fermentation temps into the upper 70's or low 80's.
All of these are issues most homebrewers face - especially in the beginning - because they are TOLD these things are ok and "fine" in their instructions and by many of their LHBS's.
"If your water tastes good it will make good beer" - no, not necessarily
"Just smack the pack and pitch"
"Just keep it under 75" ... usually no mention on ambient vs. beer temps or the value of a lower range.