During the cold weather, most of your heat is lost through the ceiling/roof. Likewise, during hot weather most of the heat is absorbed through the roof. It makes perfect sense that the roof should have more insulation.
Having said that, I do not believe that the ceiling/roof really has R40. That would be more than 12" of fiberglass or about 4" of poly-iso insulation. The R-Value of poly-iso DECREASES below 50F-60F so below freezing your would need about 50% more to achieve the same "thermal resistance". Poly-iso is less efeective abouve 75F-85F.
XPS insulation is close to the same as poly-iso, but I don't think its value drops off in cold/hot weather.