+1 for Robert's explanation above.
As far as I can see, no-one has explained that the function of the on/off switch is to short-circuit the magnetic flux in the OFF position, and to remove that short circuit in the ON position. So the "switch" function is analagous to that of a parallel shunt in an electric current circuit. The magnetic flux never goes away, the off position of the "switch" just routes it internally so it doesn't pass through an external object. The switch routes the flux internally in the off position, and routes it externally via the pole pieces in the on position.
Of course the statement that the flux never goes away is a bit of an assumption, and this goes to the heart of the original question. Magnets not made with rare-earth compounds are prone to losing their flux intensity (de-magnetising) if they are left open circuit ("ON" in this application) and without a keeper (Old Mart's bit of steel stanchion). But that goes back to the dark ages, and any magnetic stand made in the last (say) 60 years is not going to be made of materials with such a significant design weakness.
And Robert is also right about the safety aspect of this. Getting your finger pinched in the (reducing) gap between the magnet and its attraction hurts. A lot. With modern rare earth magnets the attraction force at close range can be more than your skin can support, at which point it becomes an amputation. Ouch!
The mathematics of this are simple. For a simple magnetic circuit, the closing force (force of attraction) rises as the inverse cube of the separation. So magnetism is a short range force, and the cartoon characters being sucked onto a magnet over inter-stellar distances weren't paying attention in school physics lessons.
Rgds to all
Simon
Edit – to be fair to Neil his post (while I was typing mine) introduces the magnetic "shortcircuit" concept, so my apologies for saying no-one had explained… etc. As ever, someone was typing a more succinct and elegant answer while I was still en route.
Edited By Simon Williams 3 on 04/04/2021 00:25:59