Worst case scenario is Hayward ops out and Boston gets absolutely nothing for him. Best case is he opts in for this final year. This would allow Boston to either keep them or trade them. Middle case would be him opting in for less money and more term. That would show that he is staying in Boston.
Best case is him opting-out and re-signing for longer term on a lower annual salary. That would
a) reduce or possibly even remove our tax hit this year - and potentially kick the repeater tax penalty out to 2024
b) allow him time to play to his value -- even if you still want to trade him, it would be far better to trade him after he's proven he's healthy, rather than right after playing just 4 hobbled playoff games coming off an injury.
c) again, even if you still want to trade him, trading him on a lower salary reduces the amount of salary that the other team has to send out (and that you have to take back) which helps keep us under the LT threshold (see part (a)).
d) having him on a longer term, more cost-controlled contract makes him easier to trade down the road.