In Mormon theology, why didn't John the Baptist baptize Joseph Smith? In May 1829, Joseph Smith and Oliver Cowdery went into the woods to pray because of some questions they had about baptism. As recorded by Joseph Smith, they were visited by John the Baptist, who gave them the Aaronic Priesthood. The Aaronic Priesthood included the authority to baptize.

John then directed them to baptize each other. First, Joseph baptized Oliver, then, Oliver baptized Joseph. This is an unusual arrangement because baptism generally precedes receiving the priesthood, and usually the baptizer has already been baptized.

As I understand it, in order to perform a priesthood ordinance it is necessary to have a physical body (this is why baptisms for the dead are performed by the living by proxy). As a resurrected being, John the Baptist had a physical body – evidenced by the fact that he laid his hands on their heads when he gave them the Aaronic Priesthood. So, he should have been able to baptize them as well.

My question is this: Why didn't John baptize Joseph and Oliver, or at least Joseph, and then give him/them the priesthood? It seems that this would better establish the order of baptism first, then receiving the priesthood. Is it something to do with the nature of resurrected beings? Or, is there something specific Joseph and Oliver needed to learn?

Joseph Smith's account is recorded in Joseph Smith—History.
+1 for a great question!
I have not found any solid answer or doctrine of the church that refers to this.  Perhaps in the Joseph Smith Papers you could find answers there www.josephsmithpapers.org, but I haven't searched there.
What you say is true is for today. One has to be baptized before they receive the priesthood, but if you look in the Book of Mormon, there is an instance where there was a 'joint' baptism:

Mosiah 18:13-14
13 And when he had said these words, the Spirit of the Lord was upon him, and he said: Helam, I baptize thee, having authority from the Almighty God, as a testimony that ye have entered into a covenant to serve him until you are dead as to the mortal body; and may the Spirit of the Lord be poured out upon you; and may he grant unto you eternal life, through the redemption of Christ, whom he has prepared from the foundation of the world.
14 And after Alma had said these words, both Alma and Helam were buried in the water; and they arose and came forth out of the water rejoicing, being filled with the Spirit.

Hopefully this helps, I am not sure if it answers your question though.
I could give you some opinions I have as to why John the Baptist did not perform the baptism, but they are not suitable for this site because they are opinions.
Edit I did some searching in the JSP. I think the best answer you will find is that this is they way God needed it to work to re-establish his church.

Given this general lack of early records, it is not surprising that no contemporary document recorded visionary experiences that Joseph Smith later described as having taken place during this time. No surviving documents from 1829 describe the visitations from angelic messengers, hearing the voice of God, or other aspects of the restoration of divine authority. Information on these significant events, particularly the priesthood restoration, instead comes from later accounts. In his later history Joseph Smith explained that in May 1829, he and Oliver Cowdery inquired “of the Lord respecting baptism for the remission of sins as we found mentioned in the translation” of the Book of Mormon. He then described an angelic visitation in response to their prayer for divine guidance on the subject. He indicated that their visitor conferred upon them “the priesthood of Aaron, which holds the keys of the ministring of angels and of the gospel of repentance, and of baptism by immersion for the remission of sins.” Joseph Smith further recorded: “The messenger who visited us on this occasion and conferred this priesthood upon us said that his name was John, the same that is called John the Baptist in the new Testament, and that he acted under the direction of Peter, James, and John, who held the keys of the priesthood of Melchisedeck, whi[c]h priesthood he said should in due time be conferred on us.”

Reference:
Joseph Smith Documents Dating through June 1831