Because they have identified a demand from people writing web UIs and wish to make money fulfilling that demand, I expect. There seems, from my anecdotal vantage point at least, to be a distinct trend of developers becoming more interested in hardware and it would appear that some of those developers would like to write software for that hardware using the tools they already know. Since the web has been the place where a significant portion of software has been written in the recent past, Javascript happens to be the tool that is familiar.