New MBP w/touchbar: How to change default brightness level?
That's not a standard macOS feature nor a feature of the laptop. Perhaps something's wrong with the SMC? Display backlight problems can be indicative of an SMC error.


  The display backlight doesn't respond correctly to ambient light changes.


You can reset the SMC. Shut down your Mac, then…


  After your Mac shuts down, press Shift-Control-Option on the left side of the built-in keyboard, then press the power button at the same time. Hold these keys and the power button for 10 seconds.


https://support.apple.com/kb/HT201295

The dimming when unplugging power can be controlled in System Preferences → Energy Saver → Battery: