During attestation type detection we establish whether we are on Azure by attempting an Azure vTPM attestation which internally hits the IMDS service which is only provided by Azure.
A nicer initial check would be to use their metadata API as documented here:
https://learn.microsoft.com/en-us/azure/virtual-machines/instance-metadata-service?tabs=linux
For context see #1 (comment)