But oftentimes you can find chemically active environments inside the boat in the bilge or in storage areas onboard. Things like gasoline, diesel, oil, possibly even organic solvents like turpentine, acetone, various resins etc.
Containers sometimes break in rough conditions, or rust through. Although it has nothing to do with melting foam, we had a rotten stink in a boat that was seemingly coming from nowhere, it turned out it was a canned chicken stored behind a seat. A small rust hole allowed it to very slowly drip onto the hull and then run into the bilge. (A little bit of chicken juice goes a long way.) The same happens with paint cans and other storage cans or tanks.
Styrofoam dissolves in gasoline. Say you capsize and gasoline escapes the tank, as per usual. The gasoline floats so while you're stranded on the ocean for hours or days, the floating gasoline is working it's way into everything and dissolving your flotation, unless you have a chemically resistant foam for flotation.