How does an illuminated switch light up without a neutral
They DO pass current through the switch and light at all times - just a few mA. The indicator is wired in parallel to the switch contacts.   For most types of bulbs its not enough for the light to turn on.

However with modern LED light bulbs these types of switches (as well as dimmers, and home automation switches) that dont use the neutral can cause the LED bulb to turn on enough to be noticable or flicker.