All DNS does is turn a name into a number. But what it's for is to connect you to the right system. If DNS for a dozen (or a hundred, or a thousand) different names all resolve to the same number, the box that answers to that number has to decide which directory hosts that "system". So the vhost configuration in Apache is just the last link in DNS, turning a name into a pointer to the right content.