Swag has a surprising number of meanings. It has been around for at least 200 years for a thief’s plunder or booty, the sense that C S Lewis was using. The idea of give-aways is more recent, but even that has a longer history than one might guess from the comparatively recent American usage you quote. And, of course, among other meanings, swag is also the Australian word for a bundle of personal belongings, especially a bedroll, carried by a traveller, tramp, or swagman.
It looks as though all these can be traced back to a word imported into Middle English from Scandinavian svagga, to sway (in fact, it’s the origin of sway as well). At first, the verb meant to rock unsteadily or lurch, but evolved into that of hanging loosely or heavily, to sag. Another sense of swag I haven’t yet mentioned comes from the same idea — for an ornamental festoon, or for fabric fastened so it hangs in a drooping curve; this was first recorded at the end of the eighteenth century. It’s also the origin of the American swag lamp sense you mention, in which the lamp’s electrical cable hangs in a swag.
Originally, a thief’s swag was a bag of stolen clothes or the like. This and the Australian swag derive from the idea of a bundle that sags or hangs down. Think of the stereotypical image of a tramp with his swag hanging from a pole over his shoulder; it’s not accidental that in cartoons the thief’s swag is always shown in a sack.
However, there’s some suggestion there was another word involved, also Scandinavian, the one that led to a citation for swag in the Oxford English Dictionary from 1303. In that it meant a bulgy bag. The evidence suggests it didn’t survive in its own right, but it’s possible that it influenced later senses.
One early glossary says that swag referred to any stolen goods except money, but the evidence suggests it altered through the nineteenth century until it meant small valuable items that could be easily disposed of, such as silverware.
That idea seems to have been picked up in North American youth slang comparatively recently to mean valuables or money. The sense of freebie stuff might seem to be a development of that.
However, Jonathon Green, the author of the Cassell Dictionary of Slang, has pointed out to me a book of about 1921 by Tom Norman, a travelling fairground showman in Britain, entitled The Penny Showman. He wrote about a stall that was: “set out with the usual showman’s swag, such as fancy cups and saucers, gaudy vases, shaving mugs, etc”, that is, the cheap and tawdry prizes that might be won. Eric Partridge, in his Dictionary of Slang and Unconventional English, also gives this showman’s sense, suggesting it dates from the end of the nineteenth century.
This is not so far distant from the advertising give-aways you mention, and may indeed be its direct ancestor.