The problem is contamination in raw food: when it is put in the freezer the bacterial load potentially present is inactivated, but is not eliminated and multiplies during defrosting. Only cooked food can be refrozen to avoid the risk of poisoning.
Thawing and then refreezing food is a more widespread habit than you might think, but it is also one of the riskiest practices in terms of food safety. The main danger, in fact, is linked to the spread of bacteria: when a raw food is thawed, especially if at room temperature for several hours, the microbial load can grow rapidly, even if the product does not appear to show signs of contamination (for example mold). Most microorganisms, in fact, multiply considerably in a short time, causing more or less serious poisoning: for this reason, once a food has been removed from the freezer, it is always advisable not only to treat it correctly, but also not to put it back in the freezer while still raw. With one exception: let's see which one.
Let's start by saying what freezing means: it is the home method par excellence for preserving food for a long time, from meat to fish, through vegetables, fruit, cheese, bread and ready meals, taking advantage of the lowering of the temperature, which reaches -0.4°F/-18°C, so as to keep the nutritional and organoleptic properties as unaltered as possible, blocking the enzymatic activity. However, this cooling does not kill the microorganisms potentially harmful to our body, but simply deactivates them, putting them in a sort of "pause". When the food, therefore, is thawed, the bacteria present start to proliferate quickly again especially if this operation is carried out in an inappropriate way, that is without respecting the so-called "cold chain", maintaining low temperatures that reduce the risks. It is no coincidence, therefore, that the best way to thaw is to move from the freezer to the refrigerator, between 32°F/0°C and 39°F/4°C. Raw products, in general, can contain harmful agents even when sealed: contamination can already occur during processing and transport, so packaging is not synonymous with guarantee. In addition to the passage in the refrigerator, safe options (even if you are never 100% sure) are to use the defrost function of the microwave (definitely faster) and, secondly, to cook the food taken from the freezer directly in a pot and pan if possible.
Here we come to the only exception: if the food has been completely cooked after thawing, it can be frozen again. The reason? Because cooking at high temperatures reduces much of the bacterial load, making the product harmless to our health. The process can also be repeated several times: thaw, cook, refreeze and recook and freeze again, but it is better not to abuse the opportunity. The quality of the food with continuous temperature changes tends to degrade, with taste, aromas and flavors that alter: you will have a dish that is technically still safe to eat, but no longer good.