@bendunsford is correct. Moths and butterflies need to let their wings expand after emerging and I believe they usually do this by resting vertically so the wings drape down with gravity as they expand. If they don’t get to hang down then the won’t have the space to expand correctly.
If you find one like this that looks like it just emerged, you should find it a sheltered place to hang and dry. I usually place them under a leaf in a bush.