This is something I have noticed a lot over the last three years.
I started at a sequencing centre to build the database for them from scratch. I decided to give Django a try. That took up a bit more time for the first couple of months as I was learning the concepts. But once I started to get to know it (and realized that a lot of the problems I was coding had already been implemented as part of the framework - a lot better than I had done), my productivity rocketed. The admin interface gave me 3/4 of what we were looking for without much effort at all.
I was in an office with another girl, so basically if we were talking to each other that was the only interruptions.
Three years later. We are four of us crammed into the same office. Management regularly comes down to discuss things with one person (despite having a big office upstairs for that sort of thing). Makes concentrating on a learning new feature difficult. The database is now central to running of the organization, so I am constantly bugged to fix excel upload errors (parsing excels was supposed to be a temporary solution, until I got a chance to implement something better - now it has become a chicken and egg situation - I don't get the time to code anything better, as I am constantly interrupted by trivial errors that should have been eliminated by building a proper interface ages ago).
I know form experience now that I can code a new, moderatly complex web view to return some results from the database, highlight problems etc in maybe three or four days, if I am uninterrupted. Now try doing that with constant "can you see what my excel errors is?" (honestly - its says in the big red error message - "there is nothing in the database matching what you have entered"). Writing anything that takes more than a day when you are constantly context switching easily makes me a quarter of the productivity of focusing on one task.
So I have see myself having a big drop in productivity mainly caused by poor management decisions in my opinion. As long as its not causing them any direct pain, then they are happy with the status quo.