Yeah all the replies saying "why does it bother you" etc aren't helping. Thing is phones should have PREFERENCES to suit each individual depending on how they like to use it. If you're a great fan of your screen pointlessly coming on while charging then that's great for you, but not everyone is. There should be an option to disable it.
For me I think it's a ridiculous feature, because when I'm plugging my phone in I want to charge it, so why would it automatically do something that drains the battery? kaasweckal has given one example, but there are other times when your charging is intermittent, for example a car ignition turning on and off, solar charges, etc; or just if you're in a rush! Why would it do something that drains the battery, when you're trying to charge it?? Stupid! In my case, the USB C has broken, so the charger falls out very easily, and you keep having to push it back in. If you're in a bit of a rush, the screen flashing on every time you plug it back in doesn't help with giving your battery a quick boost! And there is always the screen coming on in the dark issue. If you're out sailing or camping or something, it can take your night vision 10 minutes to recover from seeing a bright light, yes I know you can look away etc but you don't always think, especially after a long day.
It's just a pointless feature we'd be better off without. And if some people like it then fair enough but google/android please put something in the preferences to disable it.
In the meantime, kaasweckal's tasker idea is probably the closest thing we have. I use a program called "automate", i can probably write a flow in there. That'll help with the battery drain problem, but not with the blinding light in the dark issue.