If legacy was the thing Java would have won, it was more mature at the beginning of the web, cleaner and way more powerful
Even at the time (1995) smart people knew the future of the web wasn't in closed source applets.
those were slow to start, dangerous, could not respond to events in the browser easily and needed a full fledged IDE plus compiler to make. (opposed to just opening the html file and writing some).
and don't forget the closedsource (corporate) plugin you'll need to run them.
the rest is history.
not to say Java doesn't have it's place, it's just NOT in the client side of the web.
anyway all these points are way more relevant to the general web and not perse to gamedevelopment.
People who play games will more easily install plugins for that reason.