The reason you only see the www on some sites is that it is completely optional: some servers will allow one of them but most nowadays will accept both forms.
You'll also notice that some sites have other variations on the www. Generally what happens is that the webmaster uses a certain prefix for a certain type of site (www. for websites, pop. for mail servers, ftp. for FTP sites etc). This is merely a standard way of doing things, and many companies/induviduals decide to buck the trend. The BBC's news site has a news. prefix, which is normally associated with newsgroups.