To my knowledge, anything that has just been cooked and cooled down is essentially sterile. Freezing it therefore poses no danger and on defrosting and prompt re-heating for immediate consumption it will be entirely safe.
On the contrary, something raw that is defrosted and left thawed for some time will be subject to the risk of microbes already present before freezing beginning to multiply, the level of contamination rises. If the food is now cooked then it will effectively become sterile and if then frozen the same argument holds as above.
Any food, raw or cooked, which is defrosted and left thawed for some limited time then refrozen will likely have increased levels of microbial contamination encased within it (introduction of contamination while defrosted) - on second defrosting it sets off on an elevated risk status - cooking will sterilise it again, rendering it safer, uncooked the risk to health is increased. Cooked food which has been frozen, defrosted and refrozen then only heated (no proper cooking) will induce acceleration of multiplication of microbes which may have been introduced at the first defrosting (near ideal conditions in the tolerable warmth) - hence the familiar recommendation against refreezing.