The reason is the same as for why "fig" was done internally -- git is a DVCS that runs over a filesystem, while Mercurial has an actual protocol, so the storage layer can be plugged out. Presumably for Google Code it was some appengine or bigtable type backend. For fig, I believe it was, somehow, piper.