Basically, we wanted to! We've benefited hugely from open source projects ourselves, and have always enjoyed being part of the community surrounding them. It seems like the default state is to not be open source, but we realised that since we own and run the business behind ShareLaTeX, we had the freedom to play by our own rules. We also think it makes sense from a business point of view as well, since it will (hopefully) make us accessible to a wider audience, particularly onsite installations that we don't have the resources to support as a proprietary 'enterprise' system.
We've written a bit more about our motivations in our blog here as well: https://www.sharelatex.com/blog/2014/02/21/sharelatex-is-now...