Note: The clause before ものと states the past assumption; the full expression indicates it has since been contradicted. Variant: ものと思っていたが… / ものと思っていたのに… (often followed by a contrasting clause)
The expression ものと思っていた is used to convey that the speaker was under the impression that something was the case, but it turned out to be different from what they believed. It expresses a past assumption or belief that has since been contradicted or corrected by reality.
The key nuance is that the speaker genuinely believed something to be true – often for a long time or as a matter of course – only to discover they were wrong. This gives it a tone of surprise, disappointment, or realization.
The clause before ものと states what the speaker believed, and the full expression ものとおもっていた思っていた frames it as a past, now-invalidated assumption.