In The Name of Allaah, The Most Merciful, The Bestower of Mercy.
Allaah [The Exalted] said: [يَـٰٓأَيُّہَا ٱلَّذِينَ ءَامَنُواْ خُذُواْ حِذۡرَڪُمۡ فَٱنفِرُواْ ثُبَاتٍ أَوِ ٱنفِرُواْ جَمِيعً۬ا – O you who believe! Take your precautions, and either go forth (on an expedition) in parties, or go forth all together]. [Surah An-Nisaa. Verse 71]
Imaam As-Sadi [may Allaah have mercy upon him] said: Allaah commands His believing servants to take precautions against their disbelieving enemies. This includes utilizing all the means by way of which one is aided to fight them, repel their plots and strength, such as constructing defensive structures, (digging) trenches, learning how to shoot and ride, and engaging in the occupations that will aid one to accomplish this, as well as the means through which one becomes acquainted with their pursuits and plots”. (1)
The Prophet [peace and blessings of Allaah be upon him] said, “Whoever listens to the talk of some people who do not like him [to listen] or they run away from him, then molten lead will be poured into his ears on the Day of Resurrection”. [Sahih Al-Bukhaari Number 7042]
Al-Allaamah Zaid Bin Haadi [rahimahullaah] said: It may be that two or more people gather to speak about a particular affair that concerns them, and they do not want anyone else to know about it; but then a person or more than one person becomes an obstacle by listening to their speech and [wants] to know what they are talking about, whilst they are not pleased with that. This is an act of transgression and foolishness – that a person involves himself into something that does not concern him. And from the perfection of a person’s Islaam is to leave that which does not concern him. However, there is an exception to this prohibition such as when a person listens into the speech of those who are focused or [involved] in seeking to breach the state of safety and security of the Muslims. (2)
[Ref 1: an Excerpt from Tafseer As-Sadi. slightly paraphrased]
[Ref 2:An Excerpt from ‘Awnul Ahadis Samad Sharh Al-Adabil Mufrad’ Vol 3 page 281]