Uniqueness of the 5 string theories This question combines several sub-questions, the common theme being: why the known 5 string theories are unique?
Firstly, regarding heterotic theory. I understand the only allowed gauge groups are $E_8\times E_8$ and $Spin(32)/\mathbb{Z}_2$. I wanted to ask why these are the only two options but then I found this question. The answer is modular invariance. However, there is something I don't understand here. Bosonic string theory is modular invariant on 26D Minkowski spacetime, but it also remains modulo invariant when any number of the dimensions are compactified on any lattice, as far as I understand. So why here modular invariance depends on the precise compactification?
Now, two questions about type I theory
Why $SO(32)$ is the only allowed gauge group? Is it some analogue of modular invariance for BCFT? 
Why are open strings needed to make a consistent theory? I understand you can't get rid of the closed strings in an interacting theory, roughly since an open string can become closed by "stitching" its ends. However, why can't we remain with closed strings only? Is it because of S-matrix unitarity?
Finally, a broader question. Each of the 5 string theories involves a special construction, one might say a "trick". For example we need different right and left movers for the heterotic theory and projection to unorientable strings for type I theory. How do we know there aren't more "tricks" nobody thought about? Is it due to classification of SUGRAs? In particular, how do we know it's impossible to introduce fermions without requiring SUSY?
 A: Concerning your "any compactification of bosonic strings", you are confused about the nature of dimensions we are compactifying. The non-chiral (having both left-moving and right-moving component) dimensions may be compactified on any lattice $\Gamma$ with $n$ dimensions. However, to compare with the heterotic strings, this (any) lattice $\Gamma$ should be rewritten as a $2n$-dimensional lattice for left-moving and right-moving dimensions separately. In some notation, the resulting lattice is $\Gamma^{1,1}\otimes \Gamma$ and it is even and self-dual.
The point is that in the heterotic string (in the bosonic representation), we are only compactifying 16 left-moving bosons, degrees of freedom on the 26-dimensional bosonic (left-moving) side, i.e. degrees of freedom that are not matched by any bosons on the 10-dimensional  fermionic/super (right-moving) side. This chirality is what makes the possible list of even self-dual lattices so constraining and "exceptional".
In type I, the need for the $SO(32)$ group was first realized from the spacetime perspective in the Green-Schwarz 1984 paper that sparked the first superstring revolution. They showed that the spacetime anomalies (gravitational, gauge, mixed) cancel but they only cancel for $SO(32)$! 
The condition on the gauge group may also be derived from world sheet dynamics although it looks very different. Type I is type IIB with crosscaps in the world sheet (a circular hole with the identification of opposite points; something which make strings unorientable) and boundaries (which add D-branes in the spacetime perspective, i.e. allow open strings). It just happens that some extra world sheet anomaly of the allowed cross caps are exactly canceled by 16 types of boundaries and their mirror images, i.e. one obtains $SO(32)$ as the privileged group even from the world sheet perspective.
A simple condition showing what's special which interpolates between world sheet and spacetime perspectives is the vacuum energy density. Those 16 D9-branes plus their mirror images – which is how you get $SO(32)$ – exactly cancel the energy density from the (spacetime filling) orientifold plane. It's no coincidence that the group is $SO(2^{10/2})$: if we do the same calculation of the cancelation in bosonic string theory, we indeed get $SO(2^{13})=SO(8192)$ as the preferred group, a cute fact that was studied in Steven Weinberg's paper on string theory (the only one?).
Open strings are not needed to make a consistent theory perturbatively. Indeed, the "same" vacuum without open strings (ending anywhere) exists and it's called the type IIB string theory vacuum. Type I is type IIB with strings (including closed strings) made unorientable (i.e. with orientifold plane added in spacetime; or cross caps allowed on the world sheet), and the cancelation of the world sheet or spacetime anomalies both imply that one must add 32 half-D9-branes (or boundaries on the world sheet with 32 different Chan-Paton factors) at the same moment.
We can't prove that there are no additional tricks at this moment. However, we may classify the effective field theory description in the spacetime and it does seem that in $D=10$, the only four supersymmetric choices are type IIA supergravity, type IIB supergravity, and type I supergravity coupled either to $SO(32)$ or $E_8\times E_8$ gauge theory. These four possible low-energy limits – found by spacetime methods – may be shown to arise as limits of the five string theories in $D=10$. The $SO(32)$ vacuum appears twice because of an S-duality exchanging two inequivalent limits. The strong coupling limit of each of the 5 string theory vacua in $D=10$ is understood so it seems that we have covered "everything" that's allowed by spacetime consistency conditions.
Of course, it would be great to have a purely stringy control over all the options, to have a "rigorous stringy proof" that there can't be other vacua in $D=10$ etc. To do so, we probably need some more universal, "background-independent" definition of string/M-theory, something that I and others have surely looked for for many years but we still don't have it and it is by no means inevitable that it will be found (or that it exists).
