Custom domains are often used in Azure App Service for a number of reasons, including security. As an origin location, App Service apps can be configured for mutual TLS using a custom domain and origin certificate.
In Azure Console -
In Terraform -
References:
https://learn.microsoft.com/en-us/azure/app-service/configure-language-dotnet-framework
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/app_service
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/app_service_custom_hostname_binding