Upvote:2
If I understand your question to be why did all three need to appear to Joseph Smith then there is no precise answer out there that I can find, but there are several closely related answers.
The simple answer as to why they appeared to Joseph Smith can be found in D&C 27:12
And also with Peter, and James, and John, whom I have sent unto you, by whom I have ordained you and confirmed you to be apostles, and especial witnesses of my name, and bear the keys of your ministry and of the same things which I revealed unto them;
Why all three and not just one. Part of it may be because all three are recognized as prominent apostles during Christ's ministry. Having just one or two would lead to questions like why didn't all three appear to him. And from 2 Cor 13:1
This is the third time I am coming to you. In the mouth of two or three witnesses shall every word be established.
Also, the LDS believe that Jesus Christ, Moses, and Elias gave the keys to Peter, James, and John on the Mount of Transfiguration; so they (Peter, James, and John) are following the same pattern as they did anciently by having three members confer the keys. 1
The exact reasoning for having 3 apostles/prophets confer is not stated but 3 is a symbolic number for completeness or the Godhead (and the Priesthood is the power and authority of God and that power given to man to act in His name). 2
For more on Priesthood keys see this article that has select teachings by various LDS prophets/leaders.
1 http://scriptures.byu.edu/tpjs/STPJS.pdf pg 158
2 '3' sybmol meaning https://bible.org/question/what-significance-numbers-scripture and http://www.biblestudy.org/bibleref/meaning-of-numbers-in-bible/3.html and https://christianity.stackexchange.com/a/3944/22319