This Phd comic is pretty acurate about the situation: http://phdcomics.com/comics.php?f=1689
Now imagine being a newcomer with neither programming experience nor domain specific knowledge and asked to add some feature to such a legacy codebase. This is the standard case in science.