Taking away the word "what" that turns it into a question, the basic sentence is
"It does do good".
subject = "it"
verb = "does do"
direct object and NOUN: "good"
When you turn it into a question, the object becomes "what good", with "what" being an interrogative specifier.