For a company that's ostensibly there to please a young audience, Disney appears to make a lot of references to illicit activities. This scene from 'The Good Dinosaur' comes from the same school of thought as Alice's questionable visions in Wonderland.
Arlo and Spot find some berries on the floor, eat them, and suddenly begin to hallucinate. Their eyes go wide, they experience a body swap, and the world around them takes on a sparkly glaze. Kids, don't eat strange fruit you find lying around.