Shadow animatronics are one of the most mysterious creatures in the franchise. They first appeared back in Five Nights at Freddy's 2, but there is still very little information about them. Fortunately, a year later, the Fazbear Frights book series was released, which touched on shadows and their nature a little. Although this explanation is far from full disclosure, I will try to explain intelligibly who shadow animatronics are and what motivates them. At the same time, I'll share my theory about Shadow Freddy and Bonnie.
First, let's turn to the story Hide and Seek, which features Shadow Bonnie. At first, he appears in the guise of the character of the game character of the attraction, in which the young guy Toby hangs out. He wants to beat his brother's record, but fails. In the end, he decides to destroy the attraction, which provokes the Shadow Entity to become attached to him. Already at night, he has a nightmare involving Bonnie, who literally stitches himself to the guy's back. Toby's shadow changes, acquiring rabbit ears. Several times Toby tries to get rid of the shadow in the strangest ways: to brush it off, to drown it. As events unfold, it turns out that the shadow grows bigger and stronger after each outburst of anger, and Toby himself weakens.
> Toby felt awful the rest of the weekend. He mostly stayed in his room. He put an old sheet over his mirror. Even though he knew the shadow was still there, he didn’t want to have to look at it. Every time he did, his pulse fluttered, and he started to shake because it wasn’t supposed to be there. It was like this scary, dark, hidden secret. <…> His energy was spent, his back felt tight and heavy, and all he wanted to do was lie down and go to sleep.
In the end, Toby finally understands what the shadow wants–to win. In fact, the creature, like a real shadow, wanted to achieve the same thing as Toby. When the guy began to admit defeat, saying that Shadow Bonnie had won, the creature from the creepy monster returned to its former form.
> “Okay,” he said. “You win. You beat me. I give up. Whatever. I don’t care anymore.” At that moment, Toby blinked as he felt the heaviness of his back lighten. Surprised, he slowly stood up straight in front of the mirror. The shadow was still there, but it had gone back to the size of when he’d first seen it in his bedroom. The eyes and mouth had disappeared into the darkness. All he felt was a little tickle in the middle of his back once again. With that realization, it was like something clicked inside of him. A veil had lifted, and he saw everything with sudden clarity. Just like Toby, the shadow had only wanted to win.
However, in the end Toby changed his mind about giving up, which led to his death. But I think it's possible to emphasize the basic essence of shadow creatures from the story. These are creatures that become attached to people, becoming their "shadow", after which they feed on their emotions. At the same time, the shadows follow the same goal as their victims. The shadows consist of agony, a dark version of the remnant, which was confirmed in FNaF AR: SD. When the player collects too much dark residue, a Shadow Bonnie appears. Interestingly, when it is defeated, it also breaks down into agony.
So, we talked about the essence of Shadow animatronics. This image can be safely used for their game versions. However, we never found out where Freddie and Bonnie came from. But I have some pretty banal but working theories about these two. The first is that Shadow Freddy is the agony of a 1985 murder. I think this version immediately suggests itself when analyzing the details. If you look at it, you can see that Shadow Freddy always appears next to classic animatronics: in FNaF 2, in FNaF 3 mini-games, even in a nightmarish guise in FNaF 4. In the FNaF 3 mini-games, Shadow Freddy literally copies William's behavior: he lures the classics into a secret room with the phrase "Follow Me", after which William himself disassembles them. By the way, Henry at FFPS calls this event a reconstruction of the incident of '85.
> He lured them all back. Back to a familiar place. Back with familiar tricks. He brought them all together. <…> He set some kind of trap. I don't know what it was, but he lead them there again. He overpowered them again. And he robbed them of the only thing that they had. Again.
Also in the novel The Twisted Ones, at the moment when the main characters are running after the escaped animatronics, they notice a dark figure in the form of Freddy, who beckons them to lair that belongs to Afton/Springtrap.
> The figure was still there, but it seemed as far away from them as when they’d started. He glanced back at Jessica. “Is it moving?” she whispered. He nodded and started walking again, not taking his eyes from the shadowy figure. “John, it looks like … Freddy?” “I don’t know what it is,” John answered cautiously. “But I think it wants us to follow.”
The situation is similar with Shadow Bonnie – I assume that he is the agony of DCI87, because he looks like Toy Bonnie, who is the animatronic of the pizzeria where the murder took place. Unfortunately, he didn't show much of himself, apart from Special Delivery and Hide and Seek, so his version is more open.
In general, I've noticed that shadow creatures have clear similarities to Eleanor, the Yellow Thing, and other creatures from Fazbear Frights that are spawned by the remnant and haunt humans. And it is generally logical that they often have the same origin.
That's all. I hope I was able to clarify the situation.