Until 2015... then they have a clean slate.
This trade doesn't affect the Knicks financially, except for James Dolan's pockets. This doesn't negatively affect the Knicks cap in anyway. They were already in cap hell. This just gives them more flexibility when the rebuild begins, when they can start over with Melo (and probably Shump) and a bunch of money. Clearly you're not aware of the cap situation and game plan for this team. This team has two more years to win, and after that, they have a clean slate.
So you say Bargs isn't worth all of that. But let's compare stats.
Camby rarely played... so we don't even have to consider him. Any bench player can replace his stats, especially since they were pedestrian at best. Hardaway Jr. can replace him easily, and at a position we were thin at.
Novak's Stats:
6.6 ppg, 1.4 rpg, 0.1 bpg, 0.3 apg, 0.2 spg, 41.4 FG%
Bargnani's Stats:
12.7 ppg, 3.7 rpg, 0.6 bpg, 0.6 apg, 0.3 spg, 40.0 FG%
So essentially, we got a player who almost doubles Novak's production in every stat, except steals, and only shoots almost the same percentage.
Neither can play D, so that doesn't matter. Defenders still have to guard Bargnani at the 3, so that's not a big deal. And to top it off, Bargnani's contract is shorter than Novak's.
The best part of this, is now we have a PF who can play with Melo, that won't want to operate on the same part of the court and isn't offensively inept. Barg's could sit on the 3pt line with Melo in the post and still be a threat.
Barg's is far from a star player. But he's a sufficient role player. If we can get another big that plays good D and average offense. The front line should be okay. Of course, then we still have the PG issue.