
MacBook Pro Unibody 15 inches mid 2012
When I plug the charger in and the computer isn't already turned on, it starts automatically. Of course, it also starts when I press the power button and the charger is not plugged in. And if I shut down the computer while the charger is plugged in, it does not restart the computer automatically which seems normal. It's only when I plug in the charger and the computer is not already turned on that the computer starts automatically.
A bit of context that may or may not be relevant:
The battery got swollen a year ago, and I needed to replace both the battery and the keyboard because some parts of the keyboard were damaged by the swollen battery and became unresponsive. The first replacement cable I got was defective, the second was accidentally damaged by me, and the third one finally worked. So I opened my computer at least 8 to 10 times to replace the keyboard until the last one finally worked. In the process, the Hard Drive Cable got damaged somehow, and I needed to replace it too. Since then, everything has been working again (aside of the keyboard backlight, and the status indicator light that never worked since the keyboard and the HD cable were replaced but it doesn't really bother me)