I don't think there is any truth in that saying. That saying applies to cats (mostly). I've had a dog for about 6 years now and we have always been changing its food and it has never had problems due to that.
Also take a look at : How often should i change dog foods?. It says here that dog foods can be changes every 3 months.
I'm sure the food companies have a part to play in this but can't tell if it's true or false at all