Answer
The reason is that we always try to reject the null hypothesis by comparing the smaller number of signs, minus or plus, with the half of the size of the sample, $\frac{n}{2}$. That is, if we suspect that the median is less than a given median, there are more minus signs than plus signs and, then, $k=number~of~plus~signs$. But, if we suspect that the median is more than a given median, there are more plus signs than minus signs and, then, $k=number~of~minus~signs$. Either way, it will provide a $z_0\lt0$ because $k+0.5\lt\frac{n}{2}$.
Work Step by Step
Given above.