Use query string with relatedTo() with categories inside a category group
craft.categories will return you an object of type ElementCriteriaModel

craft.categories.slug('what-we-do/' ~ category|default) sets an attribute of this object, but it does not fetch the elements yet.

The relatedTo parameter needs to be an element, a list of elements, an array and some other staff but it can't handle a query (which the ElementCriteriaModel is) 

You have to fetch the element(s) before you pass it to the function with first(), ids(), last() or find()

craft.entries.section(sections).relatedTo(craft.categories.slug('what-we-do/' ~ category|default).first())


Btw: just as an additional note {{ cat | kebab }} will print the title in kebab case. Mostly that will be the slug but if the user changes the title or the slug or inserts something completely different from the beginning, your logic will break