So it drops, then returns.

No, that's not it.

The important part is "resets back to the minimum for a single block, after which it returns to its previous value".

There are plenty of such jumps - going between millions then one then millions over one block.

According to the code, the rule is that if the time of new block is over 20 minutes past the time of the previous block, then the difficulty can be set to one for this block and only this block.

What we are seeing on the graph is difficulty being permanently dropped, not just for one block, but for the whole next period, and then goes up slowly in steps of 2016. That is a completely different rule.

The difficulty will reset to 1 if the time since the last block is more than 20 minutes. There is no stipulation that after a difficulty reset block that the next block must be the normal difficulty; if the next block is more than 20 minutes after the current block, then it can also have a difficulty of 1.

For blocks that are found within 20 minutes of each other, the block's difficulty will be the same as the difficulty of the last block in the difficulty interval whose difficulty was not 1 OR the difficulty of the first block in the difficulty interval. This behavior is defined here:

https://github.com/bitcoin/bitcoin/blob/master/src/pow.cpp#L32.

The way that the difficulty retarget works is that, at the beginning of the new difficulty interval, the difficulty of the first block in that interval takes the difficulty of the last block in that interval and multiplies that by the time it took to mine the 2016 blocks and then divides it by the target time. The result is then clamped to be at least 1. Since this is based upon the difficulty of the last block in the previous interval, if that block is difficulty 1, then the next interval will also have a difficulty of one.

So what we are seeing here is that the last block in the interval is found 20 minutes after the block before it so it has a difficulty of one. Because the next block adjust the difficulty and it only looks at the block before it (which is difficulty 1), the difficulty of the next interval is 1. So the next 2016 blocks are mined at difficulty 1, and the difficulty then slowly adjusts up again.

Edit:

I was slightly wrong. Fixed that.