CNAME is like an alias - a machine must have a name that is it's "official canonical name", which is the A record, and other names can point to the same machine by saying "this domain's CNAME is (name from A record)".
www is just a convention that people have picked up on. There is nothing special about it. If you wanted to, you could call your web server web.mydomain.com, or even fruitbat.mydomain.com.
www.whatever.com is pretty much what people expect, and some people don't even see it anymore (it has become almost invisible, like the
http:// on the front).