It was obviously a creative decision come to by the director, the actor or both about how the scene was going to play.
Screenplays rarely reflect the visual action that takes place upon the screen. Most scenes require multiple takes and decisions are often made either during those takes (or beforehand) to change scenes from what is either in the screenplay or the shooting script. This happens so often that it is often better for film fans to watch the film shortly after reading the screenplay simply to see where the film has diverged from the written material.
In the clip referenced below, it is clear that it is warm in the Mexico location where the final scenes were filmed. Andy Dufresne (Tim Robbins) is wearing shorts and a cutoff sleeve shirt; and neither he nor Red (Morgan Freeman) are shown exhaling steam, indicating that the temperatures were at least in the mid 60s. As such, the simple acts of wearing goggles and a mask may have be discomforting to Robbins as the scene may have had as many as a dozen or more takes to get the lighting and blocking "just right."
Additionally, time in films is money. Every take that could have been "flubbed" by the mask and the goggle removal being performed poorly or causing Robbins to struggle, would mean that the scene would be reshot, risking that a few seconds of the film (which also may not have made final edit) would cost the studio additional money. Since the film was NOT a box office success, it now seems somewhat prescient that many extras from the screenplay and the source novel were left out of the final production.
So I would submit that the minor detail of the character's dress changing from the screenplay to the final edited film was more of a comfort or practical decision made by the director or the actor (or again, both) than anything else. These are common in films and are only noticed by film fans reading the script and perhaps those who filmed the feature itself and are aware of the changes made while trying to create the finished product.