Because .NET is part of a coherent environment which includes developer tools, database links, orm management GUI front ends, net front ends etc. etc.
Java is a language! There are losts of piecemeal bits and pieces which do all of the above, but, the quality varies considerably. From something like Apache POI which is a better interface to MS Office documents than MS provides to the abysmal J2EE stack which half does in a very complicated way what .NET does in a simple and elegant way.
Whereas for Enterprise level, millions of transactions, bullet proof, fast never lose your data all the extra work putting together J2EE, JDBC, Spring, Hibernate etc.etc. etc. is actually worth it, for a quick simple Web to Database app its just too painful, hence the attraction to ROR.
On the other hand while .NET can scale up to the big stuff (not as well as J2EE! ) it is still reasonably straightforward to do a small application.