Prior to Deathly Hallows, I always had the impression that Protego was supposed to protect the caster, something akin to making a bubble around them. However, multiple times in Deathly Hallows, it seems to be used to make a wall that was not attached to the caster. For example, this is seen in chapter 19
She looked as though ready to wrestle it out of Harry’s hands and he reacted instinctively.
The invisible shield erupted between Ron and Hermione: The force of it knocked her backward onto the floor. Spitting hair out of her mouth, she leapt up again.
When in the books was the spell first shown to have this functionality? Was it always like this? It's definitely not a one-off, as chapters 15, 26 and 36 show the same functionality:
"Protego!" she cried, and an invisible shield expanded between her and Harry on the one side and Ron on the other; all of them were forced backward a few steps by the strength of the spell, and Harry and Ron glared from either side of the transparent barrier as though they were seeing each other clearly for the first time.
she pointed Bellatrix’s wand at the waterfall and cried, "Protego!" They saw the Shield Charm break the flow of enchanted water as it flew up the passageway.
the Shield Charm expanded in the middle of the Hall