Any insight would be appreciated.
Rashi there explains that Yehoshua was somewhat guilty for what happened when Achan ben Carmi disobeyed his ban to take spoils from Yericho, since he was not commanded to consecrate the booty of the city and did it on his own account. For this reason by the next war against Ai, Hashem explicitly commanded them to take from the spoils.
Furthermore, the Midrash (Yalkut Shimoni 15:6) offers several reasons why Yehoshua declared the spoils of Yericho holy:
These reasons were specific to Yericho, and did not apply to the latter war against Ai.
The Malbim (8:2) and Abarbanel offer another explanation: Because Yericho was a supernatural war (circling the walls until they fell down) the booty was sanctified, whereas by Ai they were required to use natural war tactics ("set yourself ambush") and were permitted to partake of the spoils. (It is not advisable to benefit from the results of an open miracle - see Rashi to Ta'anis 24a "Ela Ke'echod").