I believe some of the MacBook Pros ship with chargers that cannot power them when running at full tilt. (Interestingly, I believe the original iPad Pro did as well.)
Yup. I've got last years Macbook Pro, fully specced, and when I run lots of compilations in Xcode the battery steadily drains. I ran an intense script overnight a month or two ago and when I got back in the morning my battery was down to just a few percent. Thankfully the script finished just after that so I got incredibly lucky that it didn't run out all the way and lose all the progress.
Funnily, the base model is unlikely to have this problem, which makes it a better laptop (at least in this case) for cheaper. Your script won't stop and lose progress.
That was the case for my rMBP 2012. Though it was only when running a game and battery discharged very slowly, so was not really an issue, at least for me.