Google Docs doesn't have to run on Google servers. It could run on any operating system and work from anywhere provided that you and whoever you want to work with have public IP addresses. But because everyone and everything is behind a corporate or residential router, this avenue is not available unless you are willing to work for it -- and in the case of a corporate network, you literally can't do anything except connect to a third party proxy (or a first party server) in order to be able to talk to your friends' computers. There's also no good way to handle the mobile phone problem, in which your IP address changes every so often as you pass between cell towers.
Ultimately, having each client connect to a centralized server and shuttling data between them server-side ended up being the much better solution instead of the far more attractive option (to users anyways) of connecting to each other directly.