In Exchange Online (not on-premises), under your Accepted Domains, you might have seen an option to accept mail for all subdomains:
When this feature is enabled for a domain, emails can be sent and received for subdomains of this domain. For example, if nunomota.pt is a provisioned domain and match subdomains support is enabled, users can send emails to or receive emails from a.nunomota.pt, b.nunomota.pt, a.b.nunomota.pt, and other subdomains.
This feature is usually for customers who have a hybrid environment with mailboxes that reside on-premises as it is only applicable for the Internal Relay domain type.
Following the example above, once the feature is enabled for the domain, Office 365 will be able to deliver emails that are sent to @a.b.nunomota.pt addresses by automatically forwarding them to my on-premises environment (assuming all connectors are in place).
But there is a small catch! Spam. Emails will not get blocked by EOP, meaning spammers can send millions of invalid emails to random addresses and their subdomains in order to try to overwhelm on-premises servers. Having said that, this is the case with most relay scenarios.