Yes inox literally is inoxydable but that's only literate, not the practice.Tell that to the row of stainless kitchen knives stuck to the magnetic rack above our hob!
Victorinox knives are famously stainless (the -inox literally means inoxydable!) and are definitely magnetic.
If it's a knife blade it's probably a martensitic, hardenable type of steel.
Kitchen pans are usually non magnetic austenitic grades like the 304 or 316 you mention but pans for induction hobs need to be magnetic. A set of ours seem to have a magnetic base but non magnetic sides.
Yes, martensitic is strongly magnetic (clings) but also the least corrosion resistent stainless steel grade.
Only the non magnetic, or very slight magnetic grades 304 and 316 (by far most used) are "really", let's put "excellent", inoxydable, by air then.
If you introduce salt, excellent 304 stainless gets even worse than non stainless.
That's not a joke - just put a salt lamp on a kitchen stainless steel thing.
The water in the air (humidity) causes condensation on the salt stone, resulting in salty water that drips down on the stainless.
It actually corrodes huge holes in the stainless.
I learnt it firsthand. I bought a nice decorative salt lamp, put it on a nice place.
To later discover water under it, discolored the wood.
I realized it had been condensation so I decided to put it on a kitchen stainless steel thing, to empty it when needed.
I didn't have to - the salt fret a hole in its bottom.

In the end, I had to put the thing outside, where after a year there was nothing left of the stone, leaving, a whitish burnt black circle in the greeny grass.
So, when I refer "non-stainless", I refer to the corrosion resistence, since that is were in the end it's about. Staining IS corrosion.
Actually, there is even more to take into account. Stainless steel DOES corrode, but just a very thin layer, which then protects the underlying stainless steel.
If it gets damaged or worn off, the underlying stainless steel forms a new such layer.
But there a problem can arise that prevents it: if OTHER particles get stuck in the stainless steel. Those prevent the forming of the protective layer, leaving a "gap" through which the stainless steel can further corrode in the depth.
That's why you see stainless steel bolt head corroding when they put non stainless washers - which happens ALOT, since stainless steel costs a multiple of non stainless steel bolts. They spend the bucks on bolts and nuts but try to save on accessoiries like washers. Resulting in ugly corrosion and mounts under specs and even at risk.
Also reason why using drills or other machining tools,that have been used before on stainless, and not cleaned very well, on stainless is a big NO.