A group of Microsoft Products and technologies used for sharing and managing content, knowledge, and applications.
The purpose is to be able to use domains you (your organization) owns for things like email, chats/meetings, etc. It's not mandatory, as you get a default domain with O365, but it's something that pretty much every business out there does. Back in the day you were even able to host a webpage with your custom domain name in O365.