Does spray foam add strength or rigidity to the structure?

Yes. According to tests conducted by the National Association of Home Builders, closed-cell spray foam insulation in wall cavity applications improved racking strength 330%-400% over fiberglass insulation. Roofing foams also add structural strength. The compression strength of closed-cell roofing foams is 40-50 pounds per inch while other insulations offer 20-25 pounds per inch.