 Joy and Sadness encounter Bing Bong , Riley 's childhood imaginary friend , who suggests riding the train of thought back to Headquarters . The three eventually catch the train , but it is derailed when the " Honesty Island " collapses ( when Riley steals her mother 's credit card and begins to run away ) . In desperation , Joy abandons Sadness and tries to ride a " recall tube " back to Headquarters , but the last personality island collapses , breaking the tube , plunging Joy and Bing Bong into the Memory Dump . At the bottom , Joy then begins to lose hope , but discovers a sad memory of a hockey game that becomes happy when Riley 's parents and friends comfort her . Joy realizes that Sadness serves an important purpose : to create empathy in others when Riley is emotionally overwhelmed and needs help . 
