How to increase the shelf life of yogurt without refrigeration?
This article gives an excellent review on yogurt manufacturing, but to summarize:

-Raw milk goes through centrifugation to remove somatic cells and other solid impurities.
-Thermalization is conducted at "60–69 °C for 20–30 s, aiming at the killing of many vegetative microorganisms and the partial inactivation of some enzymes."

After this point, the milk may be inoculated with lactic acid bacteria or other microfloras.

-Then, standardization occurs which for milk refers to the standardization of fat and solid-non-fat content (SNF).  This in short affects the fermentation process ("an increase of SNF increases the duration of the fermentation process").

-The next step is homogenization, which prevents milk fat from rising to the top of the liquid.  This has an effect on the stability of the emulsion.

-I think this step is where "sterility" comes into play, "heat treatment of milk reduces the number of pathogenic microorganisms to safe limits for the consumer’s health. Various heat treatments can be applied, which are classified based on the duration and the temperature. The most common are known as thermalization, low and high pasteurization, sterilization and UHT (Ultra Heat Treatment)."  The review goes into more detail about each type and what they eliminate or don't eliminate (spores, vegetative bacteria, etc.).  

-The fermentation process is the most important one for developing flavor and texture.  The two live bacterial strains of Streptococcus salivarius subsp. thermophilus (ST) and Lactobacillus delbrueckii subsp. bulgaricus (LB) are the two most basic strains used in yogurt.  LB is what metabolizes lactose into lactic acid and LB and ST acting in synergy is what causes a decrease in milk pH.  "When the pH of the yogurt approaches 5.0, activity of ST subsides and LB gradually dominates the overall fermentation process until the target value of pH is reached and the fermentation process ceases. Normally, the fermentation period is terminated by lowering the temperature to 4 °C. At this temperature, the culture is still alive, but its activity is drastically limited to allow controlled flavor during storage and distribution."  I think to answer your question, yogurt manufacturers probably have a very sensitive gauge for pH and can control temperature fluctuations finely to maintain yogurt pH and flavor (not too sour).  "After the pH of yogurt reaches the value of 4.7–4.3, the yogurt is cooled to around 5 °C. This inhibits the growth and metabolic reaction of the starter culture and prevents the rise in acidity. Cooling of yogurt can be in one or two phases. One-phase cooling involves the rapid decrease of the coagulum temperature to less than 10 °C, where the fermentation process is inhibited leading to yogurt with low viscosity. Two-phase cooling is initiated by rapidly decreasing the temperature to less than 20 °C and then gradually reaching the storage temperature of 5 °C leading to yogurt with an increased viscosity and limited syneresis. This is quite common in the yogurt manufacture process, especially when fruits are to be added."

You can read about the other innovative methods involved in yogurt making such as: Ultra High Pressure (UHP) which inactivates pathogens and microorganisms that cause milk to spoil, High Intensity Ultrasonication and Pulsed Electric Field (PEF) which all can reduce microbial content.

Edit: Forgot to mention that some DIY yogurt instructions mention that if you ferment longer and/or in warm temperatre the more sour it will be so to reduce how sour it is, either ferment it less and/or start fermentation at a lower temperature (source).

Sfakianakis P, Tzia C. Conventional and Innovative Processing of Milk for Yogurt Manufacture; Development of Texture and Flavor: A Review. Foods. 2014; 3(1):176-193.