Shouldn't Sync Gateway clean/delete the document as its added to the
Couchbase Server and is no more needed?
No. Your app is the entity that has knowledge of when a document is no longer needed and hence, it's the responsibility of the app to remove a document when it's not needed. The Sync Gateway is a synchronization gateway which means that it syncs documents between clients and the server while enforcing appropriate access control policies. It cannot manage the data on your Android device - that's the responsibility of the Android app that contains the Couchbase Lite database.
To remove a document from your Android app once you have pushed it to the Sync Gateway, you can call the Purge API within the replicated eventing callback. Once you are notified that you app has pushed up the document, you can purge it locally.
Apart from this, my Android Application is also caching up the
Documents on the mobile device. For example, if I restart the Sync
Gateway Server, there are no Documents in the Sync Gateway Server.
I would recommend familiarizing with the fundamentals of how Couchbase Mobile works.
Couchbase Lite is an embedded database. It will persist the data that you write to it and hence, it will survive restarts. If you don't want to locally store the data, then follow the steps I indicated earlier.
Sync Gateway is memory-only. Data is not stored in Sync Gateway. Data is persisted in Couchbase Server. So when you restart the Sync Gateway,it loses its in-memory cache. Next time, there is a replication/sync request from the client, it will pull the documents from the Couchbase Server. You never lose any data when you restart the Sync Gateway.