Why does: sudo bench setup production <UserName> work with different URLs?

On a remote VPS I have 4 instances of Frappe Bench running.

Then I gave the command sudo bench setup production <UserName> in one of the instance and now this instance is accessible using a standard url which is erp.mydomain.com but the site name configuration is different.

Let me try and explain a bit more.
I have instantiated Frappe Bench using command:

bench init erp15 --verbose 

In this I have create the site erp15 and set it as default using the commands:

bench new-site erp15 --db-name erp15
bench use erp15

I installed ERPNext on it using:

bench --site erp15 install-app erpnext

I set Developer mode to on.

bench set-config developer_mode 1

Then I gave the production setup command as follows:

sudo bench setup production <UserName>

As one can see the subdomain and the site name are different but still one can access it using the url erp.mydomain.com.

I want to understand what is happening here and why can I access the instance using just the url mentioned above.

I am asking because I am plain confused as in all the setup/installation documentations that I have read it is specifically stated that the URL and the site name should be the same if one wants to setup ERPNext for Production.

But this does not seem to apply in case.

My Frappe related details areā€¦

Installed Apps

ERPNext: v15.0.0 (version-15)
Frappe Framework: v15.1.0 (version-15)
Payments: v0.0.1 (develop)

Can someone please care to explain this magic and help dispel the confusion?