And the query generated using Service__c for grouping that works fine.
SELECT SUM(Starting_Hours__c) sumStartingHoursc,Service__c servicec,Service__r.Name servicerName FROM Task__c WHERE (Work__r.Sprint__c = 'a3oj0000000Xb5nAAC') GROUP BY Service__c,Service__r.Name
Using Work__c instead of Service__c for grouping should work just fine as well, but sadly no. :(