Interactive Fiction is perfectly capable of having entire stories made on acid. Some of them are surprisingly good. However, random BLAM moments often occur in otherwise serious games which were either poorly planned or rushed through the beta testing phase. We really shouldn't be surprised, since most IF is made by solo hobbyists who aren't getting paid and Sturgeon's Law applies.
The opening sequence of Infocom's classic Planetfall has the player character forced to scrub the deck in a spaceship corridor. A few turns later, along comes an alien ambassador from the planet Blow'K Bibben Gordo who drips slime all over the deck, and hangs around making a few irrelevant comments. The alien ambassador neither helps nor hinders the protagonist, and leaves just as suddenly as he arrived a few turns later. He is never seen or heard from again (and in case you're wondering, the deck scrubbing isn't important. It's just to give the PC something to do before it's time to rush to the escape pod and begin the real adventure).
It's a puzzle. Most games start expecting you to DO something, like exploration or combat. Here, those things get you tossed in the brig, making it impossible to get to the escape pod when the time comes. The correct thing to do here is the one thing you can't normally do in interactive fiction - keep your head down and wait for the plot to proceed on its own.
Infocom's Wishbringer has a small mailbox that comes to life and follows the player around, and a large mailbox that threatens the player. Neither mailbox is relevant to the storyline or puzzles, and if they happen to meet each other, they have a bizarre over-the-top fight where both expand to giant size while a crowd of postal meters gathers to see it. Then, all of them are obscured in a puff of smoke, and when the smoke clears, the mailboxes and the weird spectators are gone. The player is left to just go on as if this really crazy scene never happened.
Colossal Cave Adventure itself was given a few of these. In 1979, David Platt wrote an extended version of Adventure with several Big Lipped Alligator Moments, which he called "cameos". These included the player meeting Rover from The Prisoner, the robot from Lost in Space, a shambling hippy mummy, and a cyclops in a worsted three-piece suit who thinks you are a hallucination brought on by the "leafy green substance" he has been smoking.
Sunset Over Savannah is about a guy on the beach wondering if he should quit his job. Typing "xyzzy" in the right place produces an exquisitely purple paragraph where the Leviathan rises, scrutinizes the protagonist for a seeming eternity, and sinks back below the waves. Technically this is an Easter Egg and supposed to be odd, but the WTF is magnificent.
And as the crashing surf slowly returns to its once gentle nature, you realize that whatever verdict was decided here today will remain forever hidden from you beneath the implacable depths.
Alter Ego is about playing through the story of one's life. One moment occurs in the young adult years wherein, if you choose to play through the selected scenario all the way without backing out, you encounter a mysterious man/woman who ultimately (again, you have to stick through it without backing out) begs the player to become their "wild jungle savage", ending with a man abruptly bursting into the room threatening to shoot the player over (depending on your gender) seducing his wife, or participating in some vague incident involving Berlin and the coalition of seven... and then it turns out it was just a dream. Unlike the other scenarios, this one comes almost out of nowhere, has no bearing on the player's development, has very little to do with a game about life's experiences, and is never mentioned again.