the difference is that the author's version backs up every command to a file as it happens. If you have multiple terminals open, you do not get the same output running "history".
shopt -s histappend
Isn't that exactly what that shell option does? PROMPT_COMMAND='history -a'