I chatted with an Apple Advisor and she told me to reset system power management on the computer. I have a MacBook Pro early 2011. The steps are mentioned below. It didn’t work the first time so I tried twice. After the steps were completed, my MBP is not starting automatically when I connect the charger. I have to press the power button to start the computer (and that is how it should be).
(A) On the Mac, press and hold the power button for 10 seconds and wait 30 seconds before proceeding with the next steps
(B) 1. On your built-in keyboard, press and hold all of these keys:[br]
'''• Shift'''  on the left side of your keyboard[br]
'''• Control'''  on the left side of your keyboard[br]
'''• Option''' (Alt)  on the left side of your keyboard[br]
2. While holding '''all three keys''', press and hold the '''power button''' as well. [br]
3. Keep holding '''all four keys''' for 10 seconds.[br]
4. Release all keys, then press the '''power button''' to turn on your Mac.
(C) Once the computer is on, remove the charger, shut down your laptop. Then connect the charger. Hopefully, if you followed the steps, your issue will be resolved.