A friend told me about this and I would love to read it:
Humans in the future have colonised various planets throughout the universe.
Periodically (I think every few decades but it might be centuries) they are attacked by a powerful alien force. There have been several attempted invasions but humans do not actually know why or what the issue is.
A human soldier is caught by the aliens and taken captive, I think he was injured and they treated his wounds. Whilst he was a prisoner he asks them why they keep attacking and what they actually want.
They explain that they were appointed to look after humans long long long ago and then further explain that in those times of war the humans make their greatest leaps in technology, medicine, warfare as well as building political and social unity etc. Each time these guardians allow the humans to drive them back, at the loss of thousands of their own lives knowing that they have provided them with a jump start.
He told me about it in 1999 so it must have been published before that. He was monolingual so it is in English or at least has been translated into English.