Xbox sales were #1 for years - had to be a profit motive there regardless of software 'lock-in'.
.NET maybe, but Windows Phone? Last place in phone sales. How does that lock anybody into anything?
IE supports Java - no lock-in possible there.
Sometimes companies complete by writing software people want to buy. Microsoft has demonstrably done that, and in a market where they are clearly incapable of locking anybody to anything.
No. You're confusing sales with profits. The Xbox division lost Microsoft over $3 Billion '03-'12. This has been covered extensively but see eg) http://www.neowin.net/news/report-microsofts-xbox-division-h...
Profit, other than perhaps hope of long-term profit derived from spending their competitors out of business, was certainly not their motivation
IE runs Java applets through a third-party plugin, and Java runs on Windows because the Java guys write and distribute a VM that supports Windows. Microsoft already got itself in very hot water for trying to strongarm people off of its platform entirely (Netscape antitrust case), so they're not about to try that again. You can make software for Windows, but Microsoft is going to use their clout in legally "fair" ways to make sure you don't damage their lock-in. Java was a very serious threat to MS, which is why they created .NET and built an enterprise sales apparatus around it.
Sun lost its way and Microsoft ate up most of the custom enterprise software market with .NET. A pity really; the future could've looked much different if Sun had successfully and aggressively countered .NET. MS made sure it didn't happen because write once, run anywhere meant that Windows wasn't going to be very important anymore. .NET touted similar features, but the catch was they only wrote a VM for MS platforms, incidentally.
Pre-reply: Yes, Mono exists, Microsoft made minor contributions here and there to it, but it is now and always has been a second-class citizen in this space, and Microsoft will ensure that it always will be. It seems Mono typically gets support for an API just as it becomes deprecated and its new big brother starts to emerge on Windows. That's intentional.
Any business' end-goal is profit. With the Xbox, this is through both vendor lock-in and "owning the living room". Some MS exec once also talked about using it as a way to transition the masses of console gamers to PC, but that was probably just a "nice to have" at best.
Wanting to use something as a lock-in tool doesn't make it one. I'm pretty sure Microsoft would prefer Windows phone to be at place 1.
Almost every action Microsoft has taken in the last 20 years has been about furthering their lock-in. The Xbox exists solely to promote DirectX, which tightens Windows' foothold; other consoles were (and are) mostly based on a derivative of OpenGL, which made it easier to port games to non-Windows platforms.
.NET exists solely to ensure that more business software requires Windows, and Windows Phone exists to ensure that more mobile software requires Windows. Java's write once, run anywhere philosophy is one of Microsoft's main targets, and has been since Java gained popularity in the early-mid 90s. Cross-platform compatibility is the bane of software vendors within their sphere of influence. Since MS primarily sells operating systems and office software, everything they do is about ensuring it's difficult to use a different operating system or office software.
You can go through a similar history for almost every major software vendor. It's in their monetary interest to make it difficult for users to switch platforms, which means it's in their interest to keep your data locked up and/or obfuscated.