We know the story of Goldilocks as that of a little blonde girl who invades the home of a bear family and gets away with it because she's so young and not at all dangerous like you'd expect a home intruder to be. Besides, she's the protagonist. But it wasn't that way with earlier versions.
The earliest documented version of the story of the three bears was from 1831, when Eleanor Mure wrote about an old woman who went into the bears' home and drank milk instead of eating porridge. But a version that could be from an earlier tale starred a fox named Scrapefoot who ventured into the three bears' castle. When the protagonist was changed to a little girl, she was first called “Silver-hair.” However, the story of a home invasion may go back much further if you don't have to have three bears in it. Read about the evolution of the tale of the three bears at Mental Floss.
(Image credit: Elizabeth Tyler Wolcott)