In Parshas Devarim (Devarim 2:1-3), the Torah says that B'nei Yisroel encircled Mount Seir many times, and that G-d eventually said "You have compassed this mountain long enough".
Then we turned, and took our journey into the wilderness by the way of the Sea of Suf, as the Lord spoke to me: and we went about mount Se῾ir many days.
And the L-rd spoke to me, saying,
You have compassed this mountain long enough: turn northwards.
Why would it be necessary to encircle Har Seir, which is in Edom? The posuk later on instructs the people to turn north, e.g. towards Yerushalayim.
What was the deeper reason why B'nei Yisroel would need to encircle Har Seir?
In several places in Tanach, for example in Divrei HaYamim 1, 14:14, we read that G-d said:
“Do not go up after them, but circle around them and confront them at the baca trees."
So maybe circling around Har Seir was in order to battle the impurity, e.g. Esav, e.g. Edom?
Are there any meforshim or other sources that explain specifically why they needed to encircle Har Seir?