  We predict, analytically and by simulations, that gas discs tend to survive
only in haloes above a threshold mass $\sim 2 \times 10^{11} M_\odot$ (stellar
mass $\sim 10^9 M_\odot$), with only a weak redshift dependence. At lower
masses, the disc spins typically flip in less than an orbital time due to
mergers associated with a change in the pattern of the feeding cosmic-web
streams. This threshold arises from the halo merger rate when accounting for
the mass dependence of the ratio of galactic baryons and halo mass. Above the
threshold, wet compactions lead to massive central nuggets that allow the
longevity of extended clumpy gas rings. Supernova feedback has a major role in
disrupting discs below the critical mass, by driving the stellar-to-halo mass
ratio that affects the merger rate, by stirring up turbulence and suppressing
high-angular-momentum gas supply, and by confining major compactions to the
critical mass. Our predictions seem consistent with current observed fractions
of gas discs, to be explored by future observations that will resolve galaxies
below $10^9 M_\odot$ at high redshifts, e.g. by JWST.
