Sails are not totally rigid, and thus can never remain totally stable. So they are designed to move, but in a certain, predictable way, which depends on the consistent performance of both sail and mast. A sail designed to twist briefly and then return to shape needs a mast that does the same.