The author's example isn't really the best at illustrating this as he's just apt-get'ing things like gcc. There are plenty of cases where you'll need some specific version of gcc or some other weird tool like openocd or gdb that's hard to hunt down, or is required due to some weird development ephemera you found.
Docker makes it a bit easier to compile these requirements and hang on to them painlessly - even across a few years' time lag.