Residential, you're right .. But all shopping centers, buildings, a lot of garages all have flat roofs.
Flat roofs are not popular for residential construction because it's considered cheap up front, but more expensive in the long run. Replacing shingles on a gable roof is 50-75% cheaper than re-roofing a flat roof. Also, in northern climates (where you can go down to -30C or colder) gable roofs make more sense, as you can put more insulation in your roof, and save a lot of $$$ on heating/cooling. Due to the more open space in the roof it also allows for better venting (removal of moist air that will typically rot your roof and cause mold to form in your home!)
Lastly, gable roofs have better drainage. Most roofers don't do the best job in roofing a flat roof. I've seen flat roofs that have standing water after rain. The only way this water goes away is through evaporation (or eventually getting into your house!)
The trick for roofs to last for a long time (30+ years before needing to reroof) is to get the water away from the area as fast as possible.