profits from a customer = quality advantage + switching costs
which puts "(marginal) goodness of your product" on equal footing with "pain you can inflict on your customer for leaving".
Then again, the user experience with the leading alternative solution (MS Exchange) is so miserable that at one organization I'm aware of, the public announcement of a migration to Google Apps for Domains was greeted with a standing ovation.
Another interesting factoid: Hal Varian, co-author of Information Rules, which largely discusses strategic use of lock-in by both vendors and users, is Google's chief economist. I suspect this is a subject the organization understands well:
One of the authors is now the chief economist at Google. I highly recommend it.