Because of another reed switch. This one works by detecting a magnet embedded in the lid. Lifting the lid takes away the magnetic field ... some magnet wire, and of course, a magnet.
[Lucid Science] shows us how to make some simple reed switches. Reed switches are simple components that detect a magnetic ... switch you need only a few parts: some copper, enamelled wire and ...