'It was what I had wanted to do’
"What I had wanted to do" is a noun phrase which can be used like a noun.
It is a different in structure and usage than the "emphatic structure" you mention.
1. It was for that reason that I came. ("emphatic". "It" = "that...")
2. It was what I wanted to do. ("It" refers to something real)
In #1, "It" doesn't refer to anything other than "that I came".
It can be rewritten as "I came for that reason", in which "it" disappears.
In #2, "It" refers to something concrete independent of "what I wanted to do".
It can be rewritten as "It was the thing that I wanted to do".
"what" plays the role of "the thing that..", a noun(thing) and a relative pronoun(that).
Here's a similar example:
"Who you are is simply determined by who or what you follow."
"Who your are", "who you follow" and "what you follow" are all independent noun phrases.