When you create a SharePoint Online site collection, Microsoft Online Services uses the name of the domain you’ve selected as your default domain to build an address (URL) for your site collection. Your site collection URL will be in one of two formats: https://contosomicrosoftonline-1.sharepoint.microsoftonline.com | https://contoso-1.sharepoint.microsoftonline.com. Why’re there two site collection URL formats? Because SharePoint Online site collection URLs are built using your default domain, and there are two types of default domains, there can be two formats of site collection URLs. The types of default domains are: The trial domain created by Microsoft Online Services when you subscribed; A registered domain, that you added to Microsoft Online Services.
Full Article: What’s the Story with SharePoint Online URLs?