Diseases occur when our immune system is not working properly. The proper functioning of the immune system depends on the food we eat and thus when we are sick, we are advised to take in nutritious food.
It is also a principle of prevention of disease to ensure availability of proper and nutritious food for everyone.