If string theory is inconsistent with observations, why hasn't it been rejected yet?

You surely know that string theory has zillions of vacua. Most of these vacua can immediately be ruled out e.g. because they have the wrong number of macroscopic dimensions, or for similar reasons. But among those that remain possibilities - possessing the right qualitative possibilities - it is exceedingly difficult to calculate anything testable.

The interest in the "swampland hypotheses" - hypotheses that certain things are impossible in string theory - is that they might dramatically speed up the understanding of the theory, and its application to reality. For example, if a metastable de Sitter space lasting for cosmological durations really is impossible in string theory, then dark energy needs to be explained in some other way, e.g. via quintessence. Swampland hypotheses can also potentially have sharp implications for the allowed values of the parameters in effective field theory.

But the keyword is, potentially. None of these hypotheses have been proven. It's a little like in mathematics, where there are various high-powered propositions (generalized Riemann hypothesis, abc conjecture...) which have never been proven, but most people think they are true, and have figured out many of the further consequences, if they are true. The swampland research still has this conjectural character, and the swampland hypotheses are still challenged e.g. by the people who constructed a landscape of putative de Sitter vacua for string theory in the 2000s. Those constructions have some heuristic, not entirely rigorous ingredients, which the swampland hypotheses imply must actually be flawed. So there is a technical debate underway about whether or not they are viable.

(The implications of swampland hypotheses for the reality of the string theory landscape, and the paradigm of anthropic selection within eternal inflation, would be another reason why there is lively interest. After all, the swampland is defined as the space of field theories that aren't in the landscape.)

You could say that without the swampland debate, string theory would be stuck just with either handwaving anthropic justifications for the observed features of the world, or the slow technical improvement in the ability to calculate particle properties. The swampland debate is an opportunity to move ahead on a third front.

As an experimental physicist I will answer the title. The examples of inconsistency in the question deal with many assumptions on cosmological observations and models, and are answered by @MitchellPorter.

If string theory is inconsistent with observations, why hasn't it been rejected yet?

The standard model of particle physics is an encapsulation of all the data accumulated about particles up to now. A theory of everything (TOE) which is the goal of string theory and the holy grail for most theorists, should be able to embed the standard model, since it is the data, in addition to offering a solution for the quantization of gravity (which is relevant for cosmological models).

String theories are the only proposals up to now that embed the standard model (can fit the data) and allow for the quantization of gravity. This is done by an assignment of the quantum levels of the string to the $SU(3)\times SU(2) \times U(1)$ energy levels, since these groups exist in the vibrations of the generic string. That, plus a vibrational level appropriate to represent gravitons, is what keeps the interest in string theories and their extensions alive.

There are thousand of possible versions of string theories, and theorists have not managed to pin one down so that phenomenology can become active, and that is where we are now as far as string theory being the theory of particle physics.

So, string theories are consistent with the innumerable data of particle physics.

String theory's apparent "incompatibility" with the existence of de Sitter vacua and inflation is just a sharpening of the apparent "incompatibility" of quantum field theory, semi-classical quantum gravity and holography with de Sitter cosmological solutions and inflation.

There is a strong tension between de Sitter cosmologies and current theoretical physics, not just with string theory. Let me enumerate some examples:

  1. One famous problem with de Sitter space is the semiclassical incompatibility between the finiteness of the entropy of a given causal patch in de Sitter space given by the Hawking-Gibbons formula and the existence of hermitian operators realizing the symmetry generators of the de Sitter group in d-dimensions. Notice how robust are the arguments (based on symmetry, unitarity and holographic considerations with no more physical inputs) that have stated the problem and how drastic the consequences are.

  2. Infrared instabilities. Again, the arguments that state infrared problems follow from basic expectations about the marriage of quantum mechanics and the general theory of relativy.

  3. Absence of holography. De Sitter space has no boundary. Where does anyone expect to "localize" the "CFT" side of the gravitational bulk theory? It is true that heroic attempts to establish a dS/CFT correspondence have been developed. The truth is that it's not clear that they actually work, and in any case, the CFT side (living on the infinite timelike surface at the remote future) looks much more exotic that what is expected on physical grounds.

  4. Instanton mediated transitions between different de Sitter vacua, bubble nucleation, Coleman de Luccia instabilities and other fundamental problems with vacua of the type of Bunch-Davies and many other are wonderfully summarized in "On the Limits of Effective Quantum Field Theory: Eternal Inflation, Landscapes, and Other Mythical Beasts.

  5. The inherent difficulty of having an always interacting thermal field theory in a compact space without boundary (absence of LSZ formula and a suitable definition of S-matrix elements).

There are many other problems. But I strongly want to emphasize that string theory is not the only paradigm apparently conspiring against the quantum existence of a de Sitter vacua. It's nearly all theoretical physics, from quantum mechanics, to general relativity, to fundamental principles (symmetries and unitarity), to basic quantum gravity expectations (like holography and extensions of black hole complementarity) that seems to be conspiring against the existence of de Sitter-like vacua. Even if someone refuses string theory, all the later problems are still there.

Do the arguments from above imply that we should reject quantum field theory and our basic assumptions about quantum gravity? Of course not! The apparent incompatibility of some particular models and general principles of quantum field theory and semi-classical quantum gravity against our observations cannot rule out the latter as paradigms; the same is true for string theory.

Even dark energy and inflation would be shown incompatible with the landscape. That does not imply that a universe cannot be described as an "excited" state that could decay into a landscape solution within string theory (see de Sitter Space as a Glauber-Sudarshan State and Four-dimensional de Sitter space is a Glauber-Sudarshan state in string theory) in exactly the same way in which you can use quantum mechanics to describe the excited states of a system (not just its ground states).