This is the type of “cool” URI scheme that I aim for on my own personal website.
Personally, the reason that I started to do so (and probably many more web designer/developers too!) was after reading the article “Cool URIs don't change” – this document was written by the World Wide Web's founding father, Tim Berners-Lee.
In Tim Berners-Lee's famous article, he basically states the same reasons that
Stephen Ostermiller has in his excellent answer to this question.
To give a more specific answer to your main question, “Why extensions are hidden in URLs?” Well, I would say that the main reasons for me are:
1. To future-proof the URI:
For example, it might have sounded like a good idea at the time to use a URI like:
.pl being the file exetension for a Perl script. However, thesedays, most web developers use ASP.NET or PHP for backend-scripting, so eve though today,
sounds like a better idea, eventually PHP and ASP/ASP.net will become old-fashioned. So a better idea is to just remove the extension altogether.
2. Readability and Memorability:
It is much easier for a “cool” URI to be passed to people verbally, on paper (e.g. adverts, business cards etc.), not to mention easier to remember.
3. “Hackability” *
Although I'd say that the vast majority of users these days probably go through a search engine for everything – I've even seen people who would go to the address bar and type
www.google.com, and then use Google to literally type in
www.ebay.com! But, I think that if I have a website based on multimedia, the URI
http://www.example.com/video hints that the music section can be found under the URI
http://www.example.com/audio, and so on. (I still use the address bar to go to websites – I'm fairly “old-school” about that sort of thing!)
*(Oh! “Hackability” – does that word even exist?! Well, it does now!) :-)
To make them look prettier! (Blame my OCD!)
However, I have noticed by reading through various SEO-related websites, that a lot of webmasers actually append a file extensions to dynamic URIs, e.g.:
The actual URI may be:
However, the webmaster will perform a rewrite to make the URI “look” static, such as:
The logic behind this is that basically, a search engine will assign a higher ranking to static pages (which are, apparently, less likely to change). (Although I'm not exactly an expert in SEO, I personally don't buy into this idea myself – I'm guesing that with the kind of minds behind Google and Bing's algorithms, it will take slightly more than a fake file extension to con your way you into SERP pole position!)
For more information on naming URIs, I recommend reading these articles:
W3C QA Tips:
Brian Kelly (UK Web Focus / UKOLN - University of Bath):
Hope this helps!