When food is cooked several chemical & biological changes take place,
Cooking causes degradation of fibres in food making it soft and easy to eat, it also alters the chemical composition of various nutrients making them easy to digest.
Cooking also destroys harmful parasites on food thus preventing infections and other health hazards.
However cooking for long time at high temperatures depletes its nutritive value.