It apparently once resided in the Gravity Falls outskirts but was captured by Dipper and put as exhibition at the Mystery Shack in an attempt to show the strange happenings around the town and turn the shack into a more honest attraction than the one Grunkle was managing.
During the episode
Dipper's plan didn't come out like he wanted; the monster's power of making people see their worst nightmare by looking into their eyes sent some tourists into a coma and he and his sister, Mabel had to answer for that. Mabel was also displeased by this because, since she had been put as the boss because of a bet with Stan about who could earn more incomes in three days, she had to give them a refund. To make matters worse, the monster escaped and began tearing the shack apart and to eat the shack's profits, so Mabel came out to fight it but she was captured. Dipper also came out from hiding to defend his sister and used a mirror for the monster to see his own eyes, after having a vision about him becoming his own father, he fled the shack.