Before his extension Tyler Glasnow avg 1.25 WAR per year and got paid 28.5.
Teams don't just look at stats on fangraphs and weight a certain number of years there's many other various factors will.
Durability, potential, age, and of course every team has their own internal evaluations of guys. A team could see two 2.0 WAR pitchers completely different and might pay double for one. Pivetta misses bats, that usually gets a big premium in FA, it's the equivalent to HR on the hitting side. There are teams out there who probably look at Nick and see a guy who is a pitch or an adjustment away from being much better than what he's been.
He's getting money, take that to the bank.