- AWT sucked.
- Swing sucked.
Thus Java for desktop applications and Java in browsers both failed despite Java's enormous popularity. This opened a door for C# which was a better language and WinForms and later WPF were both much better than the early Java gui frameworks. Given the defacto death of MFC with Microsoft not introducing a new native framework they were the only option for writing Windows applications besides 3rd party cross-platform C++ frameworks like Qt, but were also considerably simpler and easier to learn than Qt and in the case of WinForms, were both simpler than Qt and leveraged one's knowledge of Win32 C programming i.e. if you cant do something in WinForms you can always invoke native calls if it comes down to it. This all led to tools for games, which are GUi applications, getting written in C#. And tools probably led to Unity and other engines being written in C# -- which was possible given C#'s speed.
C# really is a better language than Java by the way. It isn't just little things. It's implementation of generics is better in a major way and LinQ is great. LinQ is a great achievement across software engineering, period.