Another way to say "cooking is for killing bacteria in food." is "One function of food preparation is to exterminate microorganisms residing in the food."