His friends and him made it up. Its not hard to make something like that up. Look at scientology and any other new religion or cult. There was no reason for God to reveal such a thing as some "hidden" plates that do not add any kind of extra revelation for salvation. Salvation was already established, and the majority of christians today dont know, or care, who joseph smith is, nor do they need to know what he supposedly found. It doesnt affect anyone elses salvation.
All three of the witnesses left the church at some point for different reasons. Oliver and Martin returned before they died but David Whitmer never did and considered Joseph a fallen prophet. With all the miss-understandings between them they never denied their testimonies of the Book of Mormon.
5 of the eight witnesses died, Peter Whitmer, Jun, Christian Whitmer, Joseph Smith, Sen. Hyrum Smith, Samuel H. Smith loyal to Joseph Smith. Jacob & John Whitmer and Hiram Page follow David Whitmer out of the Church. Page was a brother in-law to David.
Anyone of them could have stood up and denied their witness, Hiram Page was severely beaten by a mob and driven from his home. They were all threatened and had to move many times with their families. Yet not a one ever denied their witness of what they had seen, handled and heard.
Some history
There is a conspiracy theory about David Whitmer's excommunication which says it was organized by men from within the Church who were trying to overthrow Joseph. It was sort of a culture shock to find out you couldn't vote a prophet out of office like you could other minsters.
There was this secret group call Danites, they went around causing problems with the Missouri people and actually attacking some settlers. This of course caused some of the backlash against the Church, they were doing an eye for eye sort of justice. This may have been an organized effort to destabilize the Church, like I said its a conspiracy theory. There are several different stories about them and another group who had sworn to kill Joseph but we don't have a lot of information because they didn't keep records. Another group wanted to simply depose him and replace him with David Whitmer.
My husband's great great grandfather sat on the High Council which was responsible for the excommunication. At their first meeting he and others spoke out claiming they were moving to fast. He wanted to wait until Joseph Smith got there, he was on the road and about two weeks out. They held another council but this time Grandpa isn't on the list of those who passed judgement. The question is who removed him? They couldn't hold a full council if he wasn't there.
David was always known for being an honest man, says so in his obituary but this council made the accusation that David sold land that belong to the Church. I don't know the full history of it but I believe David got his pride hurt badly. He was also threatened by this group of vigilantes and so David walked away from the Church. I have never seen any communication between Joseph Smith and David Whitmer after that. David and others eventually organized the 'Reorganized Church of Jesus Christ'.
Other men like WW. Philps who was exed with David did humble themselves. Phelps turned bitterly against Joseph believing some of the humors attached to the Danites. Sometimes hate can take over a man and destroy him. His false testimony put Joseph and others in jail for six months. And was used to justify Bogg's extermination order. Several years later when he came to himself he wrote a letter to Joseph begging forgiveness
" I am alive and with thee help of God I mean to live still. I am as the prodigal Son, though I never doubt or disbelieve the fulness of the gospel: I have been greatly abased and humbled: ... I have Seen the folly of my way and I tremble at the gulf I have passed. so it is, and why I know not. I prayed and God answered, but what could I do? ...I ask forgiveness in the name of Jesus Christ of all the saints for I will do right God helping me, I want your fellowship: If you cannot grant that, grant me your peace and friendship, for we are brethren, and our communion used to be Sweet..."
Joseph wrote back;
"I must say that it is with no ordinary feelings I endeavour to write a few lines to you in answer to yours of the 29th.... I am rejoiced at the priveledge granted me. You may in some measure realise what my feelings,....
when we read your letter, truly our hearts were melted into tenderness and compassion when we assertained your resolves...It is true, that we have suffered much in consequence of your behavior—the cup of gall already full enough for mortals to drink, was indeed filled to overflowing when you turned against us: One with whom we had oft taken sweet council together, and enjoyed many refreshing seasons from the Lord ...However the cup has been drunk, the will of our heavenly Father has been done, and we are yet alive for which we thank the Lord. And having been delivered from the hands of wicked men by the mercy of our God,...
Believing your confession to be real and your repentance genuine, I shall be happy once again to give you the right hand of fellowship, and rejoice over the returning prodigal.
Your letter was read to the saints last sunday and an expression of their feeling was taken, when it was unanimously resolved that W.W. Phelps should be received into fellowship.
“Come on dear Brother since the war is past,
For friends at first are friends again at last.”
Yours as Ever
Joseph Smith Jr
It's just sad that Joseph Smith and David Whitmer couldn't have worked out their problems the same way. However David's testimony from outside of the Church perhaps is even more convincing.