... it's still going to have 3 farms in the end to hit 20 bil. Why not get them built early and avoid wasting turns of valuable growth?
Because building them before you come close to the pre-farm population cap delays building much more immediately valuable structures. Furthermore, even if your timing is somewhat off, a planet with a decent manufacturing level can fairly easily make up for the lost turns of growth; it's only 0.1 population growth per turn as a base value, modified by approval, colonial hospitals, other growth bonuses, and birthing subsidies, which, except on a high-manufacturing world, probably won't add up to more than 0.2-0.3 population growth per turn.
The amount of food determines the maximum population of a colony (up to a maximum of 30).
Checking against the in-game numbers, it appears that population is not capped at 30, nor is the production bonus from population capped at 30. I don't know what PlanetFullPopulation in GalCiv3GlobalDefs.XML is supposed to do, but it's either not supposed to cap the population or population-based production, or it's not working.