To be fair, especially to Shaw, the likely reason he chased the fastball is because he got stuck with a strike-2 call that was *not* a strike (per Statcast). Good pitching; Pivetta went fastball outside the zone further than the bad called strike and generated a whiff.
On one hand, yes, Shaw should not swing at that. But that's also good pitching and a little bit of favorable umping on the call. It's not as cut and dry as one thing or another.