It was one of LeBron James‘ issues with the management in Miami — that was a team in a title window, yet they moved Mike Miller to save money against the league’s luxury tax. This was a potentially valuable role player just gone to save money. LeBron wants management to spend when you’ve got a chance to win — and the leverage to make it happen.

Dan Gilbert learned that lesson and he is spending. Big. Like Jay-Z buying champagne — he’s not just buying the bottle, he bought the company — Dan Gilbert is not holding back.

The Cavaliers and Tristan Thompson reached an agreement on a five-year, $82 million deal on Wednesday. Why this took so long is beyond anyone — $80 million had been on the table for months, Thompson and his agent Rich Paul wanted a max but not only did the Cavaliers balk so did any team that could sign Thompson to an offer sheet. The market wasn’t there, it might well not be there next summer either. That left Thompson out in the cold. The Cavaliers could have played hardball after Thompson didn’t sign his qualifying offer, all his leverage was gone. Instead, the Cavaliers tacked on $2 million to the deal as a face-saving measure and it got done.

This is a good deal for both sides. Win-win, if you want the cliché.

For Thompson, he gets PAID. He gets security — five years of as much money as the market would bear. Money that sets his family up for generations. There is certainly no guarantee he would have made more on the open market next year, he’s more valuable to the Cavaliers than most teams. Plus, Thompson gets to play on a contender next to LeBron. If he wanted out, Thompson would have signed the qualifying offer. He didn’t. It ended up being an overly dramatic holdout situation for him, but this was as good a deal as he was going to get. Take the money.

Did the Cavaliers overpay for a guy who comes off the bench and is not an elite scorer? Yes. (Although to qualify that, bigs in the NBA get paid more, basic supply and demand.) Did the Cavaliers dish out nearly $200 million in five-year contracts for the power forward position this summer when you consider the Kevin Love max deal? Yes, they did.

And it was the right thing to do.

When you’re in a championship window, you spend. Make no mistake the Cavaliers did — their luxury tax bill jumped $42.6 million this season thanks to the Thompson deal. The Cavs tax bill now stands at $58.2 million, and only $14.6 million of that is Thompson’s salary, according to former Nets executive and current NBA Twitter star Bobby Marks. Remember, that tax is on top of the $108.6 million in salary already being paid by Dan Gilbert.

Be glad it’s not your money.

And if you’re a Cavaliers fan, be glad he’s willing to spend it.

Thompson gives the Cavaliers a quality player up front who — as we saw in the NBA Finals — other teams struggle to match up against. He’s an elite offensive rebounder who puts up his points efficiently, he’s strong as a roll man who can finish after setting a pick, he’s a solid but not great defender (he’s not a classic rim protector), and he gives you hustle and grit every time on the court. Paired with a good ball handler and scorer — Kyrie Irving, Mo Williams — Thompson has a real offensive role.

It’s the kind of role the Cavaliers need filled if they are going to bring the first title in any pro sport to Cleveland in 51 years. The Cavaliers enter the season as one of a handful of teams with a legit shot to win it all (they are my pick), and when you’re in that championship window you spend. Even if you have to overpay a little to get a role player.

That’s why this deal works for both sides. Thompson gets paid; the Cavaliers get a guy who is not going to win Sixth Man of the Year but can fill that role for them. It’s as win-win as an overpriced contract can get.