Let's first talk about the following two sentences:
1- Sara went to bed as soon as she had finished homework.
2- Sara went to bed as soon as she finished homework.
I think your confusion is valid because we use the past perfect when we talk about something that took place before another thing in the past. So the use of the past perfect comes across in the first sentence but the use of the past simple in the second sentence doesn't. Am I right? In fact, we don't need to use the past perfect unless it is necessary or unavoidable to do so. Even if we talk about one action happening before the other one, it is possible to use the simple past for both actions if we think it is not necessary to highlight or emphasize the happening of the earlier action. It sounds natural to avoid using the past perfect where the simple past works, which is used to refer to something or several things happening in sequence (one after another) in the past.
So both of the sentences are grammatically correct. However, I'll prefer the second phrase to the first one.
As for the last two sentences, it is correct to say that "everyone had gone home when Sara got to the party", but it's not grammatically correct to say that "everyone had gone home when Sara had got to the party". It doesn't make sense. In the past perfect when we talk about two events, we use the simple past in one clause and the past perfect in the second clause.
Let's now talk about the following sentence you are confused about:
"Everyone went home when Sara had got to the party".
There is nothing wrong with this sentence, but the meaning is other way round. It means that first Sara got to the party and then every one went home. Look at the
first sentence again. When Sara got to the party, everyone had gone home. Here it means that first everyone went home and then Sara got to the party. Sometimes, one action happens soon after the other action, here we should use the past simple in both clauses such as when Sara got to the party, everyone left, when they saw the police, they ran away, etc.
'
I had to sing a song in front of the other students!
It isn't in the past perfect tense, it's also the past simple.
You use have to (here, had to) to say that something is required or necessary (here, your performance in front of the other students was demanded).
I needed to sing a song in front of the other students!
I was forced to sing a song in front of the other students!
In your sentence, both events are mentioned in the past simple. The tense sets the order in which those events happened.
I got to the classroom a bit late [event 1] and then I had to sing a song in front of the other students [event 2]!
Best Answer
I think the OP is not only thinking himself but also making us think to know as to which of the two actions happened first. As a good rule of thumb, I have never thought so whenever I used the word "until" as a conjunction in the past. However, I keep it in mind that the "until" is used as a conjunction in two senses as follows:
up to the time that
before (with the main clause in the negative)
When it's used in the first sense and we are talking about events in the past, it's very common that the main clause (mc) and the subordinate clause (sc) with "until" are both in the simple past or the mc is in the past simple and the sc is in the past perfect. Such a sentence is usually positive. Please look at the following sentences:
*I waited until the doctor came/had come.
*They played until it got/had got dark.
The use of the past perfect in the above sentences in the sc is not because the events happened earlier but because we want to emphasize or accentuate the events in the mc.
The use of the past perfect in the mc to stress the event,though not incorrect, is found seldom. For example, I had waited until the doctor came.
Now we come to the sentence in question:
The people took shelter under a tree until the rain stopped/had stopped. The sentence is 0K in light of the above; there is no doubt about it.
The people had taken shelter under a tree until the rain stopped. The use of the past perfect in the mc, though not common, is grammatically correct.