The azcopy command create the md5 for the file content and store it in the Content-MD5 property.
Description about --put-md5 option : Create an MD5 hash of each file, and save the hash as the Content-MD5 property of the destination blob or file. (By default the hash is NOT created.) Only available when uploading.
Since the md5 is calculated with the file content, it really not matters where it is calculated as you will get the same output always. Based on my understanding put-md5 option will calculate the md5 in the client machine, thats why when you upload files from Amazon S3 to Azure, the --put-md5 option is not available as in that case file is not getting downloaded to your computer.
If you are facing problems to verify the checksum, you could refer the following post.
Hope this helps