The speaker is looking back to an action that happened before another action in the past.
It had stopped raining so they continued with the picnic.
I had cooked dinner earlier in the day.
After John had cooked breakfast, he fell asleep.