Android phone powers on spontaneously during charging
It's by OEM design. See support questions and in particular this one My phone automatically turns on when I connect the charger. Why? which says

Your smartphone will turn on automatically when the charger is connected. Please be assured that it is a sign of normal operation.

And to prevent it from turning on

To charge when your smartphone is off, connect the charger first and press the Power button to turn off your phone. The display will not be turned on.
When the remaining battery is less than 5%, the battery temperature is too high or low, or the smartphone is turned off due to the high temperature, the screen will not turn on.