It's complicated. The reason whom is wrong is that it's not an object; it's a subject.
It just looks like it oughta be the object, but only if you don't know the syntax.
That's what makes it a great test distractor. Here's the example sentence, stripped of irrelevant details.
- They interviewed several candidates
2. who he thought
3. had the right experience and qualifications
3 main verbs, therefore 3 clauses:
- (1) is the main clause, and has the statement in it.
- (2) is a relative clause, modifying candidates.
- (3) is a that-less tensed complement clause, the direct object of thought.
Note that (3) is subjectless, though it's clear that its subject refers to whoever who refers to.
So the question is, why is who correct? Because it really is correct here, and whom is incorrect.
(one more example, by the way, of why I tell people never to use whom at all; who is alway safe)
Let's take a look at some other sentences. Let's start be deleting "he thought", producing
- They interviewed several candidates
- who had the right experience and qualifications.
Note that who is in fact the subject of had in this relative clause; whom would be wrong.
And another sentence:
- I think
- that they had the right experience and qualifications.
2'. they had the right experience and qualifications.
Clause (2) is tensed (it's in past tense; it's not an infinitive or gerund), it's a complement clause (the clause is the direct object of think), and it starts with the complementizer that, which is optional here, as (2') shows.
So what? Well, one more fact about tensed complement clauses:
- a tensed complement clause with that is an island, but without that it's not an island.
And two more facts about relative clauses:
- relative clause formation can extract relative pronouns from far away in the clause
(several candidatesᵢ whoᵢ had the qualifications)
(several candidatesᵢ whoᵢ he thought had the qualifications)
(several candidatesᵢ whoᵢ she said he thought had the qualifications) - but they can't extract them from islands; add that and it becomes ungrammatical.
*(*several candidatesᵢ whoᵢ he thought that had the qualifications)
What that adds up to is that the relative pronoun heading a relative clause may come from indefinitely far away, and does not necessarily have anything to do with the clause that happens to be at the beginning.
In this case, the I think part is essentially an adverb and adds no information, but instead qualifies the speaker's assertion. It plays no part in the rest of the relative clause, and its object is a whole clause, not a pronoun. Who was extracted from the subject position of that object clause and moved to the front by relative clause formation.