Heat does not only leave through low R-value. It leaves through air movement. Warm indoor air rises into the attic through recessed lights, bathroom fans, plumbing stacks and unsealed top plates. Once that moist air hits cold roof sheathing you can get frost, staining and ice dams along the eaves.
Closed-cell spray foam expands into rafter bays and sticks to the roof deck, creating insulation and an air seal in one layer. That is why we spray along rafters and roof decks rather than only adding loose insulation on the attic floor.