Why does my site only work with a www in the URL?

Basically www is just a subdomain. The reason the specific site doesn't work without the www subdomain can either be a misconfigured DNS or a misconfigured configuration.

You can try to do a nslookup to find out to which IP's they are assigned (to check the DNS settings are correct):

Example of my own domain:

nslookup responsible-disclosure.com
Server:  router.home
Address:  192.168.1.254

Niet-bindend antwoord: (non-authoritive answer in english I think)
Naam:    responsible-disclosure.com
Address:  46.105.30.3

nslookup www.responsible-disclosure.com
Server:  router.home
Address:  192.168.1.254

Niet-bindend antwoord: (non-authoritive answer in english I think)
Naam:    www.responsible-disclosure.com
Address:  46.105.30.3

If those two match you're Apache (vhost) might be misconfigured. If you don't see the misconfiguration you need to add you config nito the question so we can take a look.

As to why people prefix the URL with www check out Wikipedia:

Many domain names used for the World Wide Web begin with www because of the long-standing practice of naming Internet hosts (servers) according to the services they provide. The hostname for a web server is often www, in the same way that it may be ftp for an FTP server, and news or nntp for a USENET news server. These host names appear as Domain Name System (DNS) subdomain names, as in www.example.com. The use of 'www' as a subdomain name is not required by any technical or policy standard; indeed, the first ever web server was called nxoc01.cern.ch,[26] and many web sites exist without it. Many established websites still use 'www', or they invent other subdomain names such as 'www2', 'secure', etc. Many such web servers are set up such that both the domain root (e.g., example.com) and the www subdomain (e.g., www.example.com) refer to the same site; others require one form or the other, or they may map to different web sites.