This helps when we're haskell code running in a closed environment where there's no internet available to make the STS calls, and regional endpoints can be used using VPC endpoints service which allows direct connectivity to some services.
More information on this issue, python is handling each region's endpoint in a botocore file present in this relative path: botocore/data/endpoints.json
When the env AWS_STS_REGIONAL_ENDPOINTS is set to regional, it's calling sts.amazonaws.com whereas it should call sts.ap-south-1.amazonaws.com or some other regional endpoint.
AWS docs reference
This helps when we're haskell code running in a closed environment where there's no internet available to make the STS calls, and regional endpoints can be used using VPC endpoints service which allows direct connectivity to some services.