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".
That does make multiple terminals play nice with eachother, but it's still different, as OP's still flushes to HISTFILE after every command. But, then we can do that with