Basically, Pinkie senses danger and, since it’s after dark, she begins to allow Pinkamena to take over. Maybe it’s a quesadilla or Flash Sentry, all Pinkie knows is that she has to protect her marefriend. Twilight is just surprised by actually seeing this transformation.
I like drawing the Mane Six’s dark sides. I dunno, maybe listening to CreepyPastas and dark music helps with that. I might do something similar with Flutterbat and Lil Miss Rarity though. After testing of course.