Thats true but you have to look at it as a whole and the structure of your team. I'm gonna talk general here, i feel some teams can live through an overpaid player in his big salary years or even if you want to see it has his cap hit value IF you have some good "deals" on the team that is "money wize" compensating. Like Sykora at 650k scoring 21 goals or a young superstar producing but still getting entry level contract money or guys popping out of the blues producing or playing big minutes.
The Pens for example are able to survive with or without Malkin and Crosby (and their contracts) cause they have a bunch of "deals" on the team at this moment.
Of course it's not ideal and you don't want bad contracts but again it's not as deadly as some are making it to be sometimes. There's ways around it.
The Penguins would be a good team without Malkin, but they'd be in trouble without Crosby - Crosby is far and away the best player in the league. Regardless, those contracts are much much much better than Ilya Kovalchuk's contract, because Ilya Kovalchuk was not as good or close to as good as those players. The issue is with Kovalchuk's 'stardom' - somehow he is this giant star who is unable to produce even close to the numbers of star players 2 of the 3 years he was here.
The Devils' top scorer makes $2M on the cap this year and his bonuses may run the Devils over the cap. Their top scoring defenseman is being paid $3M, and is in the same spot. They've got Gelinas who is producing a ridiculous shot rate early on, he's providing a ton of value. Larsson is too. Reid Boucher is in the minors putting up great shot stats, he should be in the NHL next year, along with Gelinas on a cheap contract, perhaps Merrill as well. The Devils have some entry-level bargains coming. It's much much easier to build a team when your superstar player that you picked 1st overall has a dumb fixation with his birthdate that translates to a favorable cap hit.