Shaykh Muhammad Farooq Rafi
Benefits:
➊ This hadith is evidence that it is forbidden (haram) to relieve oneself in the pathways of people or under trees whose shade people use, because this causes harm to the Muslims. A passerby may become soiled with impurity and will be troubled by the foul smell.
[عون المعبود: 27/1]
➋ As for those paths which are not commonly used by people, and such shady trees under which it is not customary for people to seek shade, there is no prohibition against urinating or defecating there.
Source: Sahih Ibn Khuzaymah: Commentary by Muhammad Farooq Rafee, Page: 67