For me, I learnt Java at university in 1997-2001, I started with Java 1.1/1.2 there. I worked with Java after I graduated (learning about
servlets and JSPs, and passed my certification on these technologies with help from Bert and Kathy's book!), and generally learnt new features of Java as the newer versions of Java were adopted by the place where I worked.
So the main reason I got into Java was because of my university. But I also had experience with the Microsoft stack (back then it was Visual Basic and COM objects) and web development. I went the Java route because of the "Write Once Run Anywhere" thing - I saw it used at large organisations, running on Unix boxes, mid-sized companies running on any spare Windows box, and startups using Linux. The open source community, frameworks like Spring, and a choice of IDEs made it a more interesting ecosystem to me than the alternatives.