You can set up your web server to serve different applications on different domains if you're working on multiple projects at the same time and don't want to put them on different ports or use subdirectories.
Another use case I can see is for testing subdomain-based web apps where you give each customer a subdomain (really just a wildcard dns record), e.g. acme.myapp.com