The other day I spent five hours to write a single line of code. This has happened before, and it always makes me think "why?" To the non-developer it could sound crazy, I've heard many say things like: "it was just one line; you should be writing 100 line of code per hour to justify our budget."
The issues involved are:
The developer is working on a legacy sub-system that they had never seen before (perhaps the original creators are no longer available, and you need to dig through their work)
That sub-system is written in a different language
The sub-system itself was complicated
The line to be added was an undocumented feature
It took very long to test each change
This was a mission-critical feature, so it needed to work perfectly
You add those all together, and it's easy to see it the other way - "Wow, I'm glad we got that handled in only half a day".
Also, this is a rare case. A developer can write many lines of new code per day.
I think it touches on a bigger issue - just because the end result is simple doesn't mean that finding that result is simple too. For example, the total population for the US at a given moment is a specific number (somewhere around 300 million, off the top of my head). However, to find that exact number requires a huge bureaucracy and coordination among many civil organizations (like hospitals and immigration offices).
It something that any developer could come across, and should therefore be prepared to explain to their managers if needed.