All Windows phones stay on while charging. This is by design.
This is annoying to some, including me, but there is nothing that can be done about this. The phones/os are designed this way.
Even if the phone is connected to the charger after it is switched off, or it is switched off after connecting the charger, the phone still turns back on.
Bottom Line : Windows phone stays on when connected to a power source.
One of the reasons for this could be that the charging is controlled by OS(may be), so while it is being charged the OS has to be running.
If you do not want to be disturbed by messages or calls while charging(say at night), the only option is to use the Airplane mode.