In nordic standards, there must be an air-column between the insulation and the outer "cold" layer, to ventilate out any moisture that might get trapped there. There must also be a moisture barrier between the "hot" side and the layer of insulation, typically a PE-sheet, to prevent air from leaking into the insulation.
Since the wood expands/contracts with changes in temperature and humidity, filling compartments in wood constructions with foam does not guarantee air tight barriers.
If I were to sprayfoam something I would only consider using open cell foam. If I were to use other impervious zero-perm insulation materials like rockwool I'd only do so with dimple board to allow air underneath. The small loss of efficiency is a necessary tradeoff for giving the moisture which will always be there a path to escape.
Choosing where your moisture barrier line lies is typically easy in new construction but does get tricky with retrofit situations. It sounds like the biggest issue from the article is that they are taking what were vented attics and converting them to non-vented attics with spray foam. The issue isn't really the spray foam, the issue is converting an attic without proper understanding of venting and moisture barriers.