I guess that's because publishing the geoprocessing task doesn't include the connection to the database server?? how can a feature service be included to the geoprocessing task?
The work around of loading the feature class, by the web application, and sending it to the geoprocessing task, generates of cours hugh transfer data.
I struggled with this too and I found that you don't add the feature service but the connection to the feature class that will be used in the feature service, that also will be used in the geoprocessing.
I fixed a similar problem I had by re-reading the help article below and modifying the way in which I had the gp service accessing the raster data layer I was using. I moved the sde database connection file to a location where the SOC user had read permissions and used UNC path naming. This seemed to resolve the error 000732 message i was getting and the service worked.