From Chabad.org: Moshe sends messengers to the King of Edom requesting permission to pass through his land (which is south of Canaan) on the way to the Promised Land. Despite Moshe’s promises not to cause any harm to the land whilst passing, Edom refuses the Jews passage. The Jews are therefore forced to circumvent the land of Edom, and approach Canaan from the east.
Not only did we ask permission to cross their land, but we offered to pay for whatever we eat or drink (good for the local economy), avoid any fields where our animals might graze, and yet Edom still refused. Not only did they refuse, but they came at us with their entire force, just to make sure we adhere to their orders. Their actions hardly seem logical, unless you consider that they were still bitter over the affairs that happened many years prior, when Esav was “cheated” out of his blessing, and the Jews got it instead. Rather than focusing on the fact that we were cousins, they chose to be guided by their hate, much to their own detriment.