There are two reasons that I secondary my homebrew:
1. Clarity, especially in higher gravity beers.
2. Yeast. From what I understand, there are many dead yeast cells at the bottom of your fermenter. These dead yeast cells have the potential to give the beer off flavors.
Even if you use a single fermentor there are 2 stages, a primary and secondary stage, to the fermentation process.
I rack my beer from the primary fermentor to the secondary fermentor as soon as the active or primary stage is completed. The timing varies but is identifiable by a marked decrease in CO2 production (bubbling) and a noticeable decrease in flocculation (big clumps moving around in your beer).
I use 5.5 gallon glass carboys for both stages.
My primary fermentation usually lasts 2-4 days depending on OG and temperature.
In regards to the risk of contamination due to transferring you beer an additional time, if you follow a consistent practice of sanitation you should have no problems.