It comes from the US popular TV series
MONICA: You should feel great about yourself! You’re doing this amazing independence thing!
RACHEL: Monica, what is so amazing? I gave up, like, everything. And for what?
PHOEBE: You are just like Jack.
RACHEL: …Jack from downstairs?
PHOEBE: No, Jack and the Beanstalk.
MONICA: Ah, the other Jack.
PHOEBE: Yeah, right! See, he gave up something, but then he got those magic beans. And then he woke up, and there was this, this big plant outside his window, full of possibilities and stuff… And he lived in a village, and you live in the Village…
RACHEL: Okay, but Pheebs, Pheebs, Jack gave up a cow, I gave up an orthodontist. Okay, I-I-I know, I know I didn’t love him-
PHOEBE: Oh, see, Jack did love the cow.
RACHEL: But see, it was a plan. Y’know, it was clear. It was figured out, and now everything’s just kinda like-
MONICA: So what, you’re not the only one. I mean, half the time we don’t know where we’re going. You’ve just gotta figure at some point it’s all gonna come together, and it’s just gonna be… un-floopy.
PHOEBE: Oh, like that’s a word.
RACHEL: Okay, but Monica, what if- what if it doesn’t come together?
PHOEBE: Oh, well… 'cause… you just… I don’t like this question.
RACHEL: Okay, see, see, you guys, what if we don’t get magic beans? I mean, what if all we’ve got are… beans?