Why does nail polish eat at foam?

Nail polish has acid in it.