This setting was useful because some product images are landscape and some portrait, which was making the photo area look huge (because the container was sized to accommodate the largest picture in the gallery). It works perfectly on desktop but doesn’t seem to work on mobile. See screenshot. Note the white space under the image.
This used to be present on desktop too but enabling main carousel auto height fixed it. But issue remains on mobile.