Montreal is paying $2,056,250 in real cash for that 50% retention on Allen when you include the $406,250 they're picking up this season, plus the $1.65m next season.
If a 3rd party team retained a full 50% on Allen for $2m they'd expect to be compensated with a 2nd round pick. Leading me to think Allen had zero or negative value without salary retention on his $3.85m cap hit.
While I agree that he had no value without retention, I don't think we can compare what a 3rd party would charge for retention to what Montreal got for retention. A third party team would have been paying $2M and a retention slot to buy a 3rd round pick( I suspect it would cost more than a 3rd). The $2M in real cash Montreal is retaining is a sunk cost, they were going to pay it anyway, they are actually saving $2M in real cash.
Habs no longer had a need for Allen and he had minimal value. The most valuable asset they gave up is the retention slot. In exchange for giving it up they gain $2M in real cash, a 3rd round pick and they open up playing time for 2 younger goalies who need it.
New jersey is giving up $2M in cash and a 3rd round pick for a player that has minimal value, why would they do that? The value for them is they can send their young goalies down for more seasoning and most importantly they keep them waiver exempt. Had they finished out the season with Dawes and Schmid, one or both would have needed waivers by 2024-25. Dawes is 15 games played from losing waiver exemption and Schmid is 8 games away.