He took the police to the spot where his friend had been killed by Xyz.
He took the police to the spot where his fried was killed by Xyz.
She stood up and went to exit.
She had stood up and went to exit.
English Language Learners Stack Exchange is a question and answer site for speakers of other languages learning English. It only takes a minute to sign up.Sign up to join this community
The past perfect is used to specify that one past action occurred before another past action.
In your first pair, the ONLY technically correct form is "had been killed" because the killing must have occurred before the police could have gone to the scene. However, especially in speech or informal writing, "was killed" would be very common because the sequence of these events is certainly obvious and may frequently be irrelevant in context.
In your second example, the second in the pair is not idiomatic. The standing and leaving are being treated grammatically as one combined action (placed in the same clause, sharing the same subject, necessarily close in time, and joined by an and). Therefore, they must be treated as occurring simultaneously and share the same tense even though in physical fact they must have occurred in sequence. If you want to specify that the combined action of standing and leaving occurred before some other event, you must put both verbs into the past perfect: had stood and gone.
The distinction between your two pairs is that in the first the two actions are viewed as discrete (involving different parties in different clauses and perhaps distant in time) whereas, in the second example, the two actions are viewed as parts of one combined action. In the latter case, the same tense must apply to both of the component verbs of the combined action.