The crux of the question is the meaning of "free". As others have pointed out, the integrated development environment (IDE) for .Net is as free as the IDEs for Java, PHP, etc. That is where the differences end. Furthermore, nothing is really free.
- Runtime licenses vary in cost. If you go with a LAMP (e.g.
Linux-Apache-MySQL-PHP) platform,
there are no run-time licenses. i.e.
They are free. Microsoft will charge
you noticeably for your .Net server
licenses and your SQL Server
licenses once you deploy your
software. If you an Open Source Java
implementation, or Mono (open source .Net), deployment will be
free of licensing cost. If you use a commercial Java
Virtual Machine (JVM), you'll pay a
runtime license.
- Support is not free. If you go with LAMP, you'll end up using
in-house resources for support,
and/or you will buy support from an
external organization such as
RedHat. Microsoft/IBM/Oracle have
some level of support built in for
their paid run-time licenses.
- Legal indemnification is not free. When you go with a commercial
vendor such as Microsoft (.Net),
IBM/Oracle (JVM), and RedHat, you'll
be protected against intellectual
property claims of any software
distributed by these vendors to be
deployed by you. This turns out to
be a big concern for companies that
are big enough to be sued
successfully. These costs are
usually buried in run-time licenses
or support contracts.
Issues 2 & 3 are why big companies usually go with Java or .Net. If you are big enough to be sued successfully, the runtime licenses are a cheap insurance policy. Also, big companies have more to lose if a software deployment fails, and tend to buy better support contracts.
Issue 1 is why small startups go with LAMP. Small companies usually prefer to support their own software stacks (mooting issue 2), and are not big enough to be sued (mooting issue 3). Also a software stack built with most infrastructure software released under Apache 2.0/MIT/BSD licenses are usually safe, and the Linux GPL license risk is manageable if you don't muck with the OS or drivers.
At my first startup, we chose .Net because our client-side IDE was .Net. It ended up costing a lot in the back end (e.g. $1500/month for over a year) for the .Net/SQL-Server licenses, even though the server was hardly used because we didn't have many users.
At other startups I worked for afterwards, they chose a Linux-Apache-MySQL-Ruby stack or a Linux-Nginx-PostgreSQL-Ruby stack. The deployment costs for underused servers was equal to the hosting costs of hosted virtual servers, which was a fraction of what a .Net stack would have cost.
Any project I ever saw with a big company or with people with a big-company mindset always chose Java or .Net. As company balance sheets get squeezed in this recession, and as open source software gets better support, big companies are starting to use LAMP and other open-source stacks, but this is coming slowly.