Why isn't a Sourdough starter unsanitary?
The hint is in the name, sourdough.  Per the University of Wisconsin Extension:


  Properly  prepared starters are safe because they become acidic due to
  the fermentation action of lactic  acid-forming bacteria present in
  the mixture. These bacteria and the acid environment formed  inhibit
  the growth of other bacteria, but do allow yeast, if added, to grow
  and help leaven  bread products.


Still, they point out care must be taken to get a good result.  There have been food safety incidents related to home made starters, and using starters that can be stored in the refrigerator is recommended.  

Please see the linked article for more detail.