I think the trinity arose as a result of "facts on the ground". Early christians found themselves adoring Jesus who attained godlike status after his death and supposed resurrection. You can see the developing status of Jesus as you read the NT chronologically. That is why you can find proof texts on both sides. None of them even get close to an actual statement of the trinity.
Thus the evolution of an esoteric form of words that are blatantly self-contradictory but allowed christians to worship Jesus and still pretend to be monotheists. The HS was late to the party.