(Note: This article was co-written with SilverAlen, and it was originally his observation. Thanks Alen!)
The key here is “stock” Engineer, but after some time playing him I’ve noticed that he’s honestly more important to his team on offense than defense. At least on pubs. Why? Hear me out!
If engineer is on a dedicated offensive team, enemies are less likely to push and less likely to destroy his nest. Even when they do, they usually do not prioritize him. Defensive teams tend to use the Kritzkrieg or Quick-Fix, so you are less likely to get ubers. Spies will typically target your team’s medics, not your buildings. Even if they do push, Chances are if you grab your sentry and run they won’t target you (unless everyone already outran you). Enemies just aren’t that willing to expend resources to push past a nest when they don’t need to gain ground to win it seems.
Plus, game modes with dedicated offenses and defenses are naturally slow. The sheer number of players and amount of spam coupled with one team’s stated goal to simply hold a line combine to make Engineers an obvious boon on both sides. But coordination and teamwork are often in short supply. This means that it is quite possible a defensive engineer may find his nests getting wrecked multiple times without the enemy team making much progress. On the other hand the offensive engineer only needs to rebuild when his team does start making headway, and even then he can move existing buildings forward. So you actually rebuild less often overall, which is one of the major arguments against offensive engineer.
Then there’s the teleporter. The teleporter degrades in usefulness on a defense-dedicated team, especially when most maps will grant them migrating spawn points so they’re always pretty close to the contested point. By the end, when defending last, there’s almost no reason to build teleporters because you spawn within a sliding door of the front line. However, it only becomes more valuable on offense, where the contested point draws further and further from spawn. Considering they’re 50% of the buildings Engineer has to make, it’s telling that they only retain their usefulness when on the offensive.
Engineers use on offense is just more indirect than on defense, which is possibly why people overlook it. Being able to get your team to the front line, heal your team’s medic (plus other teammates if needed), and provide a somewhat safe fallback location are great boons. But the biggest one is that it offers a much safer area for the medic. If the medic loses his pocket, he has an area he knows he can retreat to, and often a medic can heal wounded teammates from the safety of a nest (Dustbowl and Badwater last are the most obvious examples, but I’ve seen that many more exist).