As you know the usage of JavaScript has been more and more used in web applications over the past years for technologies such as AJAX. JavaScript can accomplish really cool stuff on the client side and make the user interface more interactive and responsive. Just take a look at SharePoint 2010 - that’s some heavy JavaScripts there (a bit to heavy IMHO).
So lets assume that you are building some new cool stuff, in SharePoint of course, and why not a Page Component for a contextual Web Part.