It was the practice of the Prophet (peace and blessings be upon him):
"When he (peace and blessings be upon him) intended a military expedition, he would, in order to mislead the enemy, give the impression of some other direction instead of it."
Hadith Referenceصحیح الجامع الصغیر / حرف الكاف / 4662
Hadith Gradingالألبانی:صحيح
Hadith Takhrij[د ن] عن كعب بن مالك. فقه السيرة ٥١.