A) was first developed as a cheaper alternative to the lard needed to make candles, it had been marketed as food
"it had been" points for the sequence of events, but, in this case, "marketed as food" would have been the second event, so it would have needed no "had"
(B) was developed first as a cheaper alternative to the lard needed to make candles, it was marketed as food
This sentence lacks of contrast
(C) was first developed as a cheaper alternative to the lard needed to make candles, it was marketed as food
This is the correct choice. Similar to B but introduces "first" that expresses the contrast between the first initial intended use for the shortening and the secondo actual use.
(D) was developed first as a cheaper alternative to the lard needed to make candles, marketing as food
marketing as food modifies the entire clause before, so it would express result, but this is illogical in the intended meaning of the sentence
(E) developed as a cheaper alternative to the lard needed to make candles first, it was marketed as food
developed as a cheaper alternative? Who developed it? Lacks of a subject who can do the action of developing the shortening.
C is correct