I am a software engineer, and I think you're book analogy is a good one for explaining what a build is. Regarding the demo, I theorize that there is another software development concept in play here that is responsible for why the demo seems to reflect a build milestone that is greatly outdated. That concept is
branching.
The demo and the retail build (on the discs) are somewhat different pieces of software. Functionality is disabled and stripped out of the demo in order to leave incentive to buy the full game and to minimize the file size for the download (hence commentary was left out). At some point in the past, well before the game was a finished product a small team (maybe a single developer) took a copy of the code for the game and started developing the demo independently from the continued progress the rest of the team was making on the retail build. At this point in time a new branch of the code base was created.
To build on the book analogy. Say you were working with J.R.R. Tolkien on writing the Lord of the Rings. To drum up interest for the book and increase the release day sales he has asked you to take the current text of the book, which is currently unfinished, and extract the story as seen through the eyes of Aragorn up to a point in the plot that will leave the readers wanting more. So you take what he has written, strip out any narrative scenes that do not include Aragorn, rewrite other scenes to be told from his point of view and publish the sample. In that span of time it took to prepare the sample, Tolkien may have added new character to the overall plot, improved upon the dialog and reordered the telling of concurrent events to keep the readers hanging on every word. Thus when the actual book is available for purchase it's a much better read than the version from which the sample was extracted.