So, how come this other one works when there are essentially two 330K resistor in series between VDD and GND, which should give 6 to 12V on the chip pin when the switch is O/C ?
Possibly the are relying on the fact that very little current can flow through a 330k resistor even though the applied voltage is too high and will cause the pins internal clamping protection diode to turn on?
There is even an example given by the Atmel (or was it PIC) showing a direct input pin connection to 120vac, but applied through a high enough series resistor to limit the current such that there is no damage to the input pin. Most people would rather just limit the maximum voltage applied to a input pin to the datasheet maximum allowed voltage, but certainly if you wish to experiment with using high enough series resistance (like the values used in your divider) you may find it works fine for you.
Lefty