Porsche used the infill foam for front hood stiffness. It would prevent the light bumps and heavy-hand closing indents.
Depending where the car has been - rust belt - sea salt area - or any prior repairs - it was a breeding ground for internal rusting.
Here is a look inside of a hood that still had some foam left after a prior "very poor" repair. That previous repair just accelerated further rusting:
http://forums.pelicanparts.com/paint-bodywork-discussion-forum/637878-long-hood-repair.html#post6346388