When the Holy Prophet was in contact with the Almighty Allah and he was the most wise and knowledgeable why did he need to take counsel of his companions in martial and social affairs?
Because Allah commanded him to do so:
وشاورهم في الأمر
and consult them in the affairs
According to scholarly opinions documented in Tafsir Qurtubi and Tafsir Baghawi, the Prophet was free of any need for their advice because of revelation, however Allah still commanded him to seek their counsel to:
- honor and engage them
- to prevent them from feeling distressed and alienated or harboring reservations
- to teach them about the importance of consultation so that they would follow the precedent set by the Prophet in this regard.