There are two different approaches when working with SPF insulation in attics spaces in order to protect your home from weather and moisture-related damage. The approach implemented in a given attic is quite often determined by the building science and design principles of the architect and/or builder involved with the project.
In a vented attic, which is the traditional design paradigm, insulation is applied to the attic floor in order to insulate the ceiling from seasonal swings in temperature. SPF is applied between the floor joists of the attic, which is also where fiberglass batt or blown cellulose is installed. Other areas in the attic are left un-insulated and vented via the soffits, gables, or ridge vents. While this type of attic system is the most commonly used system in the U.S., it is not the ideal system when it comes to energy efficiency, indoor comfort.
The unvented attic space is considered the most effective and up-to-date building practice, particularly by the spray foam industry. The foam is directly applied to the underside of the roof decking, around the rim joists, in soffit areas, and on gable wall ends. This application effectively seals off the attic from the outdoors and eliminates air infiltration through the attic and roof areas.
The debate over vented attics and unvented attics is currently ongoing in building science circles. Proponents of unvented attics maintain their method reduces moisture and heat build-up in summer months, as well as the occurrence of ice dams in winter months, in a superior manner than that of standard construction methods calling for vented attics.
With that in mind, it's no rarity in certain climates for vented attics to reach temperatures of 130 degrees F or higher during summer months. With those severe temperatures, air conditioning units have to work harder to maintain the interior climate, particularly because ductwork is often run through attics. Also, the temperature difference between the hot attic air and the cold air in the ducts can lead to the formation of condensation.
When spray foam is installed on the underside of the roof deck, the attic space is insulated from heat that otherwise would be conducted through the shingles, underlayments, and roof decking, and be radiated through the attic. The insulation reduces wildly high temperature spikes, and so the attic becomes a "conditioned" part of the home, like any other room.
Proponents of vented attics may denounce an unvented system, as they maintain that wood needs to breathe and shingles need to transfer heat in order to avoid overheating and curling off the roof surface.
On the wood-breathing issue, lumber manufacturers tend to kiln-dry wood prior to use, and some manufacturers claim that exposure to outdoor air can expedite deterioration. For example, kiln-dry wood, which is commonly used in furniture, contains a small amount of moisture to prevent splitting and cracking, and so the furniture is sealed to prevent complete drying. Indeed, wood must be sealed to ensure longevity, which is one reason why wooden houses, fences, boats, etc. are painted and sealed from the elements.
As for curling shingles, roofing product manufacturers whose products can't withstand summer temperatures are hard to come by.