Dangers of spray foam in body panels?

If the paint is properly adhered and the foam is applied to the entire surface how is moisture going to cause damage? It is no different than current home spray foam insulation. They coat everything in the walls and attic rafters with it. Since it seals tight against whatever it is applied to it prevents moisture from getting to cause damage. The key is to prevent water from gaining entry. There is supposed to be a body plug at the bottom of the area in question. Install one of the fancy ones that has a water drain built into it and everything should be fine.