Perhaps "infection" is going too far, but the main reason for racking into a secondary fermenter is to get your beer off the sediment (trub) which can produce off flavors. Clarification is also a benefit.
This is from All About Beer: "I imagine that you are already familiar with the layer of debris that collects at the bottom of a fermenter. This debris includes flakes of protein called "trub" (pronounced "troob") as well as dead yeast cells and other materials that precipitate from the beer. The positive flavor effects of secondary fermentation can be improved by separating the young beer from this debris. In commercial breweries this is done by simply draining the debris out of the bottom of the fermenter. To accomplish this at home, we must move the beer and leave the debris behind. As a result, it is common for many homebrewers to employ a second fermenter.
During secondary fermentation, the yeast reduces or removes certain undesirable flavor components (diacetyl, acetylaldehyde, and some sulphur compounds), thereby maturing the beer into a more drinkable condition."