And even if they don't win, third parties can influence policies of the main two. The main two want to avoid splitting voters across themselves and similar-but-different third parties. Third parties gaining a significant percentage can pull the main parties in their direction to avoid losing those voters again.