There have been arguments about who wrote this book, reputed to be the last one of the books of the New Testament.
Some argued that it was written by a disciple of John the Apostle, called ‘John the Presbyter’, according to Eusebius comment on Papias (Church History, Book III:39:6); but the majority attribute the book to Apostle John, the beloved disciple of our Lord, who resided in Ephesus, Asia Minor, until his disappearance.
Whoever it was, it was finally confirmed canonical by the total agreement of the Christian Church, all over the world by the V century, and it has been held as such since then.
There are not passages in the Bible where the doctrine of the Trinity is explained. The term itself and the formulation, it is man-made, that tries to present in understandable manner, something that by nature is beyond human understanding. We are finite beings, we cannot fully comprehend the nature of GOD, who is infinite. We can only say what He is not, and what He is, according to the limited information given to us in Scripture, and that God Himself has in his mercy, allowed us to know. Not to satisfy our curiosity, but to create a proper relationship between us and Himself, as He manifests in our cosmos. And that is all we know from our Almighty God.
However, the Trinity, even though it is explained in man-made language, the concept itself it is not human invention, but born from the lose links God has revealed to us in his holy book.
The reading above, from the book of Revelation is one of the best, almost explicit parts of these links we have.
Here, the author called John, starts the narrative of the revelation that was given to him, by announcing that it is divine, coming from YHWH and Jesus, the two main speakers of the revelation, given to him through angelic ministration
After this declaration, he proceeds to address the recipients, the seven local churches of Asia Minor, where he resided; and passed on to give them the Divine Blessing from the author of this revelation, God Himself, which is expressed as coming equally from YHWH, the Seven Spirits, and Jesus of Nazareth
Every case where this type of blessing is given, it is always in the Name of the only one who can bless someone and all, GOD Himself (Numbers 6:25; Romans 1:7; 1Corinthians 1:3; 2Corinthians 1:2; Galatians 1:3; Ephesians 1:2; Philippians 1:2; Colossians 1:2; 1Thessalonians 1:1; 2Thessalonians 1:2; Philemon 1:3; 2Peter 1:3). Never a blessing is given ‘in the name’ of an angel, or another person, whether alive or dead. Only God Himself.
But in this passage, the author passes the blessings of God the Father, who is sitting in the throne as Supreme deity, alongside the Seven Spirits from under his Throne, and Jesus; making these names equal in power to the One in the Throne. This passage clearly identifies the divinity of the Father, the Seven Spirits and Lord Jesus as equal, giving a single blessing in the Name of the Three divine beings seen in the vision.
This defeats the heresies of dualism, that holds only the person of the Father and Jesus as God, and not the Spirit, by presenting the Holy Spirit as the ‘Seven Spirits’ in significance of the seven virtues of the Spirit to mankind as can be seen in Isaiah 11:2 and Romans 12:6-7. Here even when the one and only Spirit of God is presented sevenfold, in reality, He is one, and by blessing in His Name, John is making the Spirit of the same nature as the one sitting on the throne, GOD.
It also defeats the heresy of modalism that understands the divine nature as manifestations of the One God, sometimes as Father, sometimes as Son, and sometimes as Spirit; by making a simultaneous visible apparition here to John, and blessing us all at the same time.
This, and the manifestation during the baptism of our Lord, are the only two narratives where the whole Holy Trinity manifests Himself simultaneously, and it is greatly treasured by all Christians.
God revealed Himself as Trinity, because He wanted his creatures to live in communion with one another, being by nature Himself a creating sociable God.
It was also revealed to us that way, to make possible for us to understand his work and relate to Him accordingly, as Father, as Redeemer and in the Spirit.
It revealed Himself finally, as a Trinity, for the love to mankind, because He had to subdivide Himself into his offering Son in payment for our sins, since no created being could pay for the whole of creation; offered to Himself as Supreme Judge, and then stay with millions of us in an invisible manner in the form of the Holy Spirit, to bring us to faith, repentance, and sanctification, and thus complete the redemptive work He started and will see to conclusion (Philippians 1:6).