That's almost laughably random. If Fortier hadn't gone to that party, it might have never been made. And that's why you should always tell all your friends the idea you had during your midnight shower, no matter how strange it seems in the light of day. You never know, right?
Once it was approved, Casper and his team had to throw it together quickly:
"It took probably a couple of weeks to write it, not full-time. We only had a week or two to cast it because a short window opened up with this production company. There was a very short hiatus between all these other shows. We shot it in three days, with one half-day later."
Adult Swim
They needed that extra half-day to film 200 more Wonder Spins.
Because Casper works for Adult Swim, and because Adult Swim has a reputation for catering to a demographic that enjoys a certain contentious recreational activity (we're referring to BASE jumping, obviously), everyone wanted to ask the same awkward question. Vulture asked Casper how high he was when he came up with the idea, Rolling Stone's very first question was about how much cough syrup he had taken, it came up during a Reddit AMA, and half the people who shared it with you probably made the exact same joke. But, Casper had some thoughts about how weed actually affects the creative process:
"I think everybody who does partake knows you can't get much writing done that way. It can be watched that way, but it's not written that way. We just do a bunch of drafts; we keep honing it and honing it. There's a quote from the Coen Brothers that I like -- not to compare myself to them. But, I'm a big fan of theirs, and it blows my mind that they don't outline. There are movies such as Miller's Crossing that are so intricate, I can't imagine how they would not outline. But, they said, 'If we don't know what happens next, there's a good possibility the audience won't know.' I thought that was pretty funny."
20th Century Fox
Which means the first few drafts of this scene might have been way, way sexier.