Most species of frog can regurgitate their stomach. This mechanism is in place so that they can expell undigestable food (their digestive tract doesn't go straight through, it ends at their stomach). I'm not positive on this, but I don't think this is a reaction to being put into alcohol (or whatever preservative; formaldahyde isn't used anymore, it can cause cancer or something). Most likely, the biological supply company threw some of those frogs in so the teacher could show what this process looks like.