Or the basic definition of Past Perfect:
It is often used to indicate that an action was going on (like a background) at a time when something else, more important and more dramatic (the foreground action) happened. The new action is expressed by Simple Past Tense, e.g.
While the man was looking at the picture, the thief stole his watch.
So, there's nothing jarring having two different tenses in the same sentence. It's a natural use of some tenses (like in above example) to combine themselves with a different tense in one sentence.
It is used to speak of an action concluded before a certain time in the past or before the time of occurrence of another action (denoted by Simple Past Tense) and yet continuing into it, e.g.
Lucille had learned English before she came to England.