Your last sentence is probably most accurate and relevant to the current situation.
Every team in a win now mode takes those types of chances and deals with the consequences later on down the road. It's the cost of trying to win a championship.
The Bruins had a historic regular season and lost in the first round of the playoffs. If they had won the cup, would we still be having this conversation?
There are many other variables between then and now that affected the cap; nit just those two signing and bonuses. Also, during that time, Swayman grew, flushed and prospered; and happily so for Boston. Swayman, just as easily, could have faltered, falling on his face or been just mediocre.
Unfortunate events happen. Boston main objective is to stay a legitimate contender. Do what needs to be done for the present, without being totally foolish about the future, but that still may include taking calculated risks.
I am sure Boston and Sway will find their way and Boston will pay Sway a reasonable pay-day and Sway will ultimately play.