The article says that there is a gene for resistance to that cancer already present in the Tasmanian Devil genome. It's a fascinating mechanism. Wonder if it evolved related to overpopulation?
The likely reason the cancer is transmittable at all is due to underpopulation/genetic bottleneck. Animal immune systems usually have no problem recognizing and destroying cells from other individuals, even cancerous ones, but you need sufficiently distinct immune markers on your cells for them to recognize as "foreign."