It is unfortunate that the mainline Mastodon server doesn't support proper multi-domain hosting/multi-tenancy, but that is just implementation detail rather than protocol issue. There are alternative servers that support multiple domains[1] and multi-domain support has been discussed also for Mastodon server[2]
[1] for example https://jointakahe.org/
[2] https://github.com/mastodon/mastodon/issues/2668