Do null and alternative hypotheses have to be exhaustive or not? I saw a lot of times claims that they have to be exhaustive (the examples in such books were always set in such way, that they were indeed), on the other hand I also saw a lot of times books stating they should be exclusive (for example $\mathrm{H}_{0}$ as $\mu_1=\mu_2$ and $\mathrm{H}_{1}$ as $\mu_1>\mu_2$) without clarifying the exhaustive issue. Only before typing in this question I found somewhat stronger statement on the Wikipedia page -- "The alternative need not be the logical negation of the null hypothesis".
Could someone more experienced explain which is true, and I would be grateful for shedding some light on the (historical?) reasons for such difference (the books were written by statisticians after all, i.e. scientists, not philosophers).
 A: The main reason you see the requirement that hypotheses be exhaustive is the problem of what happens if the true parameter value is in the region which is not covered by either the null or alternative hypothesis.  Then, testing at the $\alpha %$ level of confidence becomes meaningless, or, perhaps worse, your test will be biased in favor of the null - e.g., a one-sided test of the form $\theta = 0$ vs. $\theta > 0$, when actually $\theta < 0$.  
An example: a one-sided test for $\mu = 0$ vs $\mu > 0$ from a Normal distribution with known $\sigma = 1$ and true $\mu = -0.1$.  With a sample size of 100, a 95% test would reject if $\bar{x} > 0.1645$, but 0.1645 is actually 2.645 standard deviations above the true mean, leading to an actual test level of about 99.6%. 
Also, you rule out the possibility of being surprised, and learning something interesting.
However, one can also look at it as defining the parameter space to be a subset of what might typically be considered the parameter space, e.g., the mean of a Normal distribution is often considered to lie somewhere on the real line, but if we do a one-sided test, we are, in effect, defining the parameter space to be the part of the line covered by the null and alternative.
A: On principle, there is no reason for hypotheses to be exhaustive. If the test is about a parameter $\theta$ with $H_0$ being the restriction $\theta\in\Theta_0$, the alternative $H_a$ can be of any form $\theta\in\Theta_a$ as long as $$\Theta_0\cap\Theta_a=\emptyset.$$ 
An example as to why exhaustivity does not make much sense is when comparing two families of models, $H_0:\ x\sim f_0(x|\theta_0)$ versus $H_a:\ x\sim f_1(x|\theta_1)$. In such a case, exhaustivity is impossible, as the alternative would then have to cover all possible probability models.
A: The alternative does not need to be exhaustive neither the null hypothesis must necessarily mean something different than what it states. For example, consider three independent observations $X_i\sim N(\mu_i,1)$, $i=1,2,3$, where $(\mu_1,\mu_2,\mu_3)\in\mathbb R^3$ and the problem of testing $H_0:\mu_1=\mu_2=\mu_3$ vs $H_1:\mu_1\leqslant\mu_2\leqslant\mu_3$ with at least one inequality being strict. This is a basic problem of order restricted inference,  see e.g. Robertson, Wright and Dykstra (1988, Order Restricted Statistical Inference) or Silvapulle and Sen (2005, Constrained Statistical Inference: Inequality, Order, and Shape Restrictions). In this problem the null hypothesis does not mean anything else than that the three distributions coincide while the two hypotheses are not exhaustive.
