because salt, when it's in water, breaks down into sodium ions (not lethal) not elemental sodium and chlorine ions not chlorine gas. Your body has all the tools required to handle sodium and chlorine ions (literally "pumps" that move them in and out of cells, and organs that process the ions so they can be excreted in urine.
But yes, in general it's interesting how little difference there is from "essential nutrient" and "human poison"
That's literally the same as asking "how come hydrogen (flammable) + oxygen (enhances fire) = water (does not burn)?", but we probably have a better mental grasp of how water works.
It’s all about electrochemical potential. Adding or removing electrons from the outer shell of an atom involves a fair amount of energy, either being released or stored. Depending on the atom, they either want their shell filled or emptied. Noble gases have the same number of protons as a filled shell, so they are very stable. Why electron shells exist is a whole other matter.
Water is kind of like ash. Technically full combustion of any hydrocarbon outputs CO2 and Water. Since water isn’t a greenhouse gas it’s not mentioned when discussing combustion usually.
This is one of the reasons why methane leaks are so impactful - not only is methane a terrible green house gas, when it decays in the upper atmosphere, it decays into water vapour and CO2)
As a fun aside, there are plenty of rocket engines that run on hydrogen + oxygen. For instance the Space Shuttle Main Engine [1] was fueled by hydrogen + oxygen, which means its exhaust was literally water vapor.
I assume by "lethal" you mean "highly reactive" as opposed to "poisonous".
Something that really wants to give away electrons and something that really wants to gain electrons are going to really get on well, and will be really stable.
Is there enough water in the mouth to get sodium to explode? Probably just scalds you.
Elemental sodium in the air spontaneously oxidises to sodium hydroxide which is nasty and caustic but the hydroxide layer spontaneously forms bicarb which is comparatively harmless. At a best guess, I'm not convinced a block of sodium not swallowed is lethal... (it will be extremely harmful)
Volume of the mouth is about 150mls (half a can of coke). Maybe you have a big mouth so let's call it 180mls. That's 10 moles of water (assuming saliva is 100% water). At 0.9688gcm^-3 they're basically 1:1 and the stoichiometry is also 1. So max you can fit about 115g of sodium to 90ml of water.
If we ignore the dynamics of the explosion that seems enough to cause a maybe lethal explosion. It would also release 120dm^3 of hydrogen.
They're both lethal because they both want to be in salt. They will turn you to salt and make themselves happy and make you dead. Alternatively if they are already salt they're chillin.
Because one really really wants to give away an electron, and one really really wants to accept an electron, and so when they meet and consummate that they're both delighted.
They are small first of all so reactive. And having so close full orbitals they really really want to get rid or take that electron. Thus aggressively make things happen...
And why it is yummy, well they are pretty useful atoms in lot of chemistry and in general balancing things that happens in body. Thus it is nice to have sufficient amount around... Best way to encourage this is to make it taste good like sugar does too.
The general idea is actually quite intuitive. Sodium doesn't like being sodium (metal), and chlorine doesn't like being chlorine (gas), they are very angry and will do anything to change the situation. But they like it when they are together as salt and they are well behaved in this form. This is, of course very simplified.
An example I like is with nitrogen. Nitrogen atoms really want to form nitrogen gas (N2), a form that is really stable and therefore unreactive and generally harmless. However, if the nitrogen atoms are not in this form, and they have the opportunity to turn into it, they will, and they want it so much that it can be violent. That's why a lot of explosives are nitrogen-based, they are made of nitrogen atoms that have been separated from their N2 form by giving them a lot of energy, and when they come back together as the explosive is detonated, all that stored energy is released.
Even greatly simplified, it’s pretty important to understand the difference between a salt and a covalently bonded compound – sodium and chloride don’t really stay together, nice and inert; they disassociate readily in a solution. Salt water has individual sodium and chlorine ions freely floating around. But being ions now, both have gotten what they wanted, and are quite content and nonreactive now.
But yes, in general it's interesting how little difference there is from "essential nutrient" and "human poison"