Out of curiosity, why would one set window.location.hash?
To save some state of your JS application which can be saved to bookmarks (or copy-pasted to someone else). For example, Gmail adds "#sent/12aa04feebaac50e" when I open an e-mail I just sent. Also, to get the "back" button to work properly in JS applications.