The temperature will naturally equalise so if the yoghurt is warm when it's put into a cold flask, the heat will seep out to make the temperature of the environment the same.
By preheating the flask it is warmer than the yoghurt so will keep the internal environment of the sealed flask warm and allow the cultures to flourish.