Players like Hayward are always in the max territory, so it would have to be a very serious injury, or some freak thing like what happened to Bosh. Also, since he has the player option he could always activate it for that fourth year.
Wrong. Players like Hayward are rarely if ever in max territory. What you're observing right now is an artifact of being the best player on the market at times when teams find themselves with unprecedented amount of cap space because of one-time jumps in the the total salary ceiling.
Several years ago, Hayward would have been looking at a Monta Ellis type of deal. Ellis signed for 5 years, $55 million total in 2008. He did that coming off of his age-22 season in which he averaged 20 points, 5 rebounds, and 1.5 steals per game.
Ellis' potential max was $14.65 million per season, or nearly $100 million over the duration of a five-year contract. He signed for half that -- and has never come close to making as much money again (relative to the cap).
When the cap stops jerking up and returns to its more customary incremental annual increases, I fully expect players like Hayward (and Al Horford, for that matter) will not be worth nearly as much. If Hayward is smart, he won't be leaving (too much) money on the table.
I think that one, there is an expectation now that teams need at least three max guys to win, so teams prepare their cap accordingly. Rookie deals did not jump as high relative to the cap so teams are able to save money there to put towards veterans. Also, now that the large cap jumps will settle down, teams should be spending less and in three years time there will be suitors for a 30 year-old Hayward with cap space. Will they be desirable teams? Maybe, maybe not.
Also, I don't know what GS's cap situation was at the time, but I think Hayward is more valuable than Ellis was back then. Especially in today's game, someone who can shoot 3s, play D, pass, and actually do a little playmaking is very in demand. He has prototypical size and also made the all-star team. Ellis has never been an all-star and is a little undersized.
But yes, you're right that staying with a desperate team such as Utah where he is unquestionably the face of the franchise is safer from a financial standpoint. The point still remains that in the first three years of the deal, there isn't a huge difference between what Boston and Utah can offer. The question is what can he get as a 30 year-old free agent in 2020?