The System Management Controller may be corrupted and mistake your Mac as being at a dangerously low battery level when pulled off from power, thus turning it off. Also, your MacBook Pro battery says 100 but dies when unplugged could be caused by battery or charger issues.