From TF2 Wiki
Defensive classes serve to inhibit enemy access and to hold enemies back from vital points on the map. In total, this group has the most firepower of all the groups, and these classes specialise in expelling this power at one time. Demomen can safeguard areas with sticky bombs and detonate them at will. Heavies are great for mowing down incoming troops and pushing back forces. Engineers can build sentry guns with amazing power, as well as teleporters and dispensers.