Looking at it from New Jersey's position, surely they had issues in front of the net and have had injury issues. but they are still 6 pts out of a playoff spot.
1) They move their top goal scorer in Toffoli for a 2nd and a 3rd, while retaining 50% of his $4.25M cap hit. So they still carry $2.125M.
2) They trade a condition 3rd for Allen, with Habs retaining 50% of his $3.85M, so Devils only have $1.925M.
So $2.125M + $1.925M = $4.05M.
So they saved $200K on the cap by shipping their top goal scorer out and bringing in another team's third goalie. And all they netted out of that in draft capital is a 2024 2nd round pick.
It is somekind of a trend, as we've seen this last year too....Teams are selling and buying at the same time, which hardly make senses.