If you turn the phone off and then plug it in to the charger, it will turn on. That is normal and expected behavior. Why it might turn on at other times is something that would be hard to answer without a lot more data.
However, there are good reasons for not turning your phone off at night. The most important one is that, if you have the phone plugged in, connected to WiFi and the screen locked, it will automatically back itself up to WiFi every night. That means you would never lose more than a day's worth of data if your phone were lost or stolen. Also, your phone will be charged and ready to go in the morning.
See also:
When to charge your iPhone or iPad - Apple Community