Devarim 31:9 records that after Moshe wrote the Torah, he "gave it to the priests, sons of Levi, who carried the aron of the covenant." This verse implies that the priests carried the aron (the box that contained the luchot) when the people were in the desert, but Bemidbar 4:15 (also 3:31?) and Devarim 10:8 and 31:25 record that the Levites carried the aron and not the priests.
Hizkuni (on 31:9) writes that 31:9 should not be understood to mean that the priests carried the aron and he suggests two reasons why in 31:9 the Torah refers to the priests as the people carrying the aron even though he claims they did not carry the aron. One, this reference is because very shortly afterwards the priests would carry the aron when the people crossed the Jordan River, Yehoshua 3:3,6,8, when the people circled Yericho, Yehoshua 6:6,12, and during the ceremony on Mount Eval and Mount Gerizim, 8:33 (also Melachim I 2:26 and 8:4-6), but these were exceptions to the general rule, see Sotah 33b. Two, the priests helped prepare the aron for travel (see Bemidbar 4:5,6), so 31:9 can refer to them as if they also carried the aron.
Abarbanel (1999, p. 491) suggests that the phrase “who carry the aron” in 31:9 refers just to the “sons of Levi’ and not to the priests. The idea being that the Abarbanel splits the phrase "the priests, the sons of Levi" into two groups: The priests and the sons of Levi. According to this idea, 31:9 should be understood to mean that Moshe gave the Torah to the priests, and to the sons of Levi, who carried the aron, and to the elders of the people.
Both of these suggestions are difficult since the phrase, the priests, the sons of Levi, occurs several times in Devarim (17:9, 18:1, 21:5) and the implication of all these verses is that the phrase is just referring to the priests. The phrase, the sons of Levi, is a description of the priests that they are part of the tribe of Levi. Hoffmann (1961, comments on 17:9) explains that with regard to the events recorded in the books of Shemot, Vayikra, and Bemidbar, the priests were just Aharon and his immediate family, and they are sometimes referred to as the sons of Aharon. However, in the book of Devarim, which transpired at the end of the fortieth year of the people’s stay in the desert, the number of priests had grown and hence they are described based on their tribal affiliation, which is Levi.
If the phrase, "the priests, the sons of Levi," just refers to the priests, then the question remains that 31:9 implies that the priests carried the aron, and not the Levites.
My guess is that during the people's stay in the desert there was a change with regard to who carried the aron. When the people first entered the desert, the only priests were Aharon and his four sons, and two of his sons, Nadav and Avihu, died in the second year of the people's stay in the desert, Vayikra 10:2. Thus, initially there were not enough priests to carry the aron, and hence, the Levites carried the aron. Accordingly, Bemidbar 4:15 and Devarim 10:8 which refer to the beginning of the people's stay in the desert only mention that the Levites carried the aron. However, by the end of the forty years, there were enough priests who could carry the aron, and they began to carry the aron either along with the Levites or just by themselves. Thus, shortly after the events recorded in chapter 31, when the people crossed the Jordan and were in the land of Israel, the priests carried the aron, Yehoshua 3:3-8, 6:6,12, and 8:33. However, instead of these cases being exceptions to the general rule, these cases are examples of the change that transpired during the forty years of the people living in the desert that the priests carried the aron instead of or in addition to the Levites.
Rav Soloveitchik (2010, p. 277) in his comments on the kinah, eicha yashvah chavselet ha-sharon, notes that there is an argument between the Ramban and the Rambam as to who was supposed to carry the aron after the people came to the land of Israel. The Ramban’s (on Sefer ha-Mitzvot shoresh 3, ve-khen) view is that the Levites were to carry the aron even in the land of Israel, while the Rambam’s (Sefer ha-Mitzvot positive commandment no. 34) view was after the people reached the land of Israel, then the priests were responsible for carrying the aron. Our understanding of 31:9 accords with the Rambam’s view, and 31:9 might be the basis for the Rambam’s view.
If this approach is correct, it remains to explain 31:25, which records that Moshe commanded the Levites who carried the aron. Why does the verse not refer to the priests as the people who carried the aron as in 31:9? First of all, Ibn Ezra (on 31:25), suggests that 31:25 could be understood as a shortened version of 31:9, and then 31:25 would mean that Moshe was referring to those Levites who carried the aron, namely the priests. A different idea is that this change at the end of the forty years of the people’s stay in the desert that the priests carried the aron did not preclude the Levites from carrying the aron even when there were enough priests to carry the aron. Thus, in 31:25, Moshe was referring to anybody, the entire tribe of Levi, who might carry the aron. Yet, if this is true, why did Moshe not refer to the Levites also in 31:9?
The difference in the references to who carried the aron between 31:9 and 31:25 relates to how the two verses connect to their surrounding verses. In 31:9, Moshe referred to the priests and the elders since in the ensuing verses Moshe gave the instructions for the Hahkel ceremony, 31:10-13, and it was the responsibility of the priests and the elders but not the Levites to ensure that the Hahkel ceremony was to occur every seven years. Thus, Moshe could not have referred to all the members of the tribe of Levi in 31:9. Also, in 31:9, Moshe mentioned that the priests carried the aron, which they had begun to do at some point in the desert, since just like they had the responsibility to carry the aron, they had the responsibility to ensure that the Hahkel ceremony would happen.
On the other hand, the context of 31:25 is that Moshe had just added the “song” to the Torah to teach the people not to sin, 31:24. This undoubtedly took time, and Moshe was then somewhat rushed for time since he had not known about the song when he had planned his last day. After writing the Torah with the song, Moshe needed it to be placed in the aron (or on its side), and this could have been done by either a priest or a Levite since both groups could carry the aron. In order for this to be done quickly, Moshe referred to the Levites in 31:25 since he wanted to increase the pool of people who would place the Torah in the aron. In addition, 31:28 records that some people were to go and gather the leaders of the nation. The reference to some people can only be to the Levites referred to in 31:25, and again the more people Moshe could get to gather the people the quicker the job would be done. Accordingly, in 31:25 Moshe refers to the Levites, which includes the priests, to increase the number of people who would place the Torah in the aron and who would go about gathering the elders and leaders of the people.
It should also be noted that the message concerning the song, and now the Torah, after the song was added to the Torah, was for all the people to learn, 31:19. Accordingly, in 31:25, it could be from a metaphorical perspective that Moshe refers to everybody who can carry the Torah, which is all the Levites and the priests, to take the Torah, and not just to place the Torah in the aron but also to teach the people, the Torah and the song that it contained. With this idea, Moshe’s message in 31:25 was more geared to the Levites. who were going to live throughout the people in the land of Israel, than the priests, even if the Levites were no longer the main group of people who carried the aron.
Bibliography
Hoffmann, David Tzvi (1843-1921), 1961, Commentary on Deuteronomy, translated by Tzvi Har-Shefer, Tel Aviv: Nezach.
Soloveitchik, Joseph, (1903-1993), 2010, The Koren Mesorat Harav Kinot, with commentary on the kinot based upon the teachings of Rabbi Joseph B. Soloveitchik, edited by Simon Posner, New York: OU Press and Jerusalem: Koren Publishers.