because it can be used as a client side machine independent "scripting" language - like javascript.
and it's properly typed which means you can likely compile to more optimal code.
js uses doubles for everything which isn't optimal. recall some talk of this changing.
c# supports multiple threads, etc. etc.
java would do as an alternative also. not quite sure why it's gone out of fashion.
just because js is the html5 default scripting language doesn't mean it's the best choice. we can evolve.
unity (3d html page plugin) uses c# for example. as does a ton of other stuff.
mono implementation for non m$. what's blocking html5 supporting this out of the box, aside from inertia ?