Why does cosmos allow me to use custom domains?

Hi,
I'm using private link with cosmos db in a hybrid environment where on-prem is paired with azue using express route gateway. I'm runing my own DNS-server on-prem.
In my quest for on-prem connectivity I tried to map the private ip of cosmos db to a public dns-zone azureservices.<my company>.com.
In my native this feels like a much simpler solution than the recomended approach of setting up a dns forwarder in azure
To my suprise this actually worked. I tested by replacing my custom domain in the connection string provided by azure and using it in the stadalone storage explorer. I able to browse collections, instert new documents etc.
I'ved traced the network traffic using wireshark I can see that storage explorer succesfully establish a tls channel with cosmos ( to the private ip held by the private link)
Can some one explain to me how this is possible? Should I not get an SSL error on the client side due to mistmatch in certificate host?
Is my approach a viable, and much simpler, solution to setting up a dns forwarder?