Canned food is literally pasteurized in said can, while submerged in water at temperatures slightly lower than 100 °C. The whole reason to put food in cans is to create an airtight atmosphere that can be thermally treated with hot water. This kills certain spores (mainly botulinum) which is why canned food has a very long shelf life.
It’s still not correct to cook the food that way, but not because of the reason you made up.
Canned food is literally pasteurized in said can, while submerged in water at temperatures slightly lower than 100 °C. The whole reason to put food in cans is to create an airtight atmosphere that can be thermally treated with hot water. This kills certain spores (mainly botulinum) which is why canned food has a very long shelf life.
It’s still not correct to cook the food that way, but not because of the reason you made up.