In the equation $\dfrac{(2x-8)}{(x+5)} \leq0$ if you put $x = -5$ it reduces to $ \frac{-18}{0} \le 0$ as the denominator is zero the left side of this inequality is known as division by zero.From the same Wikipedia url :
Whether this expression can be assigned a well-defined value depends upon the mathematical setting. In ordinary (real number) arithmetic, the expression has no meaning, as there is no number which, multiplied by 0, gives a (a≠0).
So as we are dealing with real number arithmetic here we are excluding $x=-5$ from the domain.
Coming to the solution, $\dfrac{(2x-8)}{(x+5)} \leq0 \Rightarrow (2x-8) \leq0\Rightarrow x \leq 4 $ only if we assume $(x+5) \neq 0$,but then either $(x+5) \gt 0$ or $(x+5) \lt 0$.
But when $(x+5) \lt 0$,multiplying will reverse the inequality giving $(2x-8) \geq0 $ hence,$x \lt -5$ and $x \ge 4$ which makes no sense,hence discarded.
So the only possible solution is when $x \gt -5$ and $x \lt 4$ i,e. $-5 \lt x \le 4$