The two witnesses represent Moses and Elijah who in turn represent the the Law and the Prophets. It was they who appeared with Jesus at the transfiguration. In the Gospels Jesus is portrayed as the new and greater Moses and Elijah. This can be seen in Matthews gospel in particular. That is why he said that the scriptures talk about him.
If the two witnesses represents Moses and Elijah in Revelation,why were the 12 Apostles witnesses of both of what you speak of?
Luke 24:44-48
He said to them,''this is what I told you while I was still with you: Everything must be fulfilled that is written about me in the Law of Moses ,
the prophets and the psalms.
Then he opened their minds so they can understand the scriptures.
He told them ''This is what is written :The Christ will suffer and rise from the dead on the trird day,and repentance and forgiveness of sins will be preached in his name to all nations,beginning at Jerusalem.
You are witnesses of these things.
Jesus opened up their minds to all of the scriptures.That includes everything that is written about him (Jesus),the Law of Moses ,the Prophets and the Psalms.
The Bible is his testimony (Jesus) .In the NT he makes the Apostles his witnesses of his testimony by opening up the OT scriptures to him.
People tend to over look this verse,thinking that the Apostles were only to witness his suffering,death and rise on the third day.
But that's also in the OT scripture.It all leads up to Jesus.
Here's another overlooked verse.
Matthew :28:18-20
Then Jesus came and said to them ''All authority in heaven and on earth has been given to me.
Therefore go and make disciples of all nations,baptizing them in the name of the father and of the son and of the Holy Spirit,and teaching them to obey everything I have commanded you.And surely I am with you always to the very end of the age.
He will be with them always to the very end of the age.The 144,000 will be his witnesses of his testimony,which is the Bible.The Bible is the two witnesses spoken of in Rev:11.
The remnant will be his witnesses of his testimony by opening up their minds to the scriptures.
Just like the 12 Apostles were witnesses of the OT scripture.
Revelation:14:1-2
Then I looked,and there before me was the Lamb standing on Mount Zion,and with him 144,000 who had his name and his fathers names written on their foreheads.
And I heard a sound from heaven like the roar of rushing waters (thirsty anyone?)
And like a loud peal of thunder(voice of God)
The sound I heard was like that of harpists playing their harps.(song of the 144,000/opening up of scriptures.)
When Jesus said in John:12:28
"Father glorify your name!
Then a voice came from heaven,I have glorified it,and will glorify it again.
Some thought it had thundered,others thought it was the voice of a angel.
He did glorify his name during Jesus death on the cross,but he will glorify it again in Revelation.
The reason why the Lamb stands with the 144,000 is because they will preach repentance as his witnesses to the testimony of the Lamb.