What’s going on in a sentence like this: He explained as best he could why he was late yet again, which in the end was not enough to save his job. We can understand easily enough that the statement is communicating two ideas, but how those ideas are connected through the word which might strike us as unusual. Is it correct? And why the comma?
Our first thought might be to read which as a relative pronoun. We remember that the three chief relative pronouns in English are who, which, and that. Each connects one clause to another by carrying a copy of a noun (or pronoun) in the first clause over into the following clause. In the sentence I read the novel that you recommended, for example, there are two clauses, and the relative pronoun that represents the noun novel in the second subordinate clause. Relative pronouns are pronouns, which is to say that they stand on behalf of (pro) another word so that we can avoid a tedious repetition: I read the novel, the novel you recommended.
What’s important to note in this second example is that the relative pronoun that has a specific noun it is pointing to. The word to which a pronoun refers is called its antecedent, and a sentence can go wrong when the antecedent is not clearly understood. Here, the antecedent novel is obvious enough and the sentence unfolds nicely. But if we now return to our original example and continue with our first assumption that which is a relative pronoun, what exactly is its antecedent in the first clause? We cannot say that which is referring to the pronoun he (in any of its three occurrences), because the relative which can only refer to a thing, not a person (we say the man or woman who, not the man or woman which). So given the fact that there is no other noun or pronoun in that first clause, are we correct to conclude that the sentence is poorly constructed?
In fact, we are not. If we read the sentence again closely—He explained as best he could why he was late yet again, which in the end was not enough to save his job—we can see that the word which is referring to the entire preceding idea, the complete string of twelve words which together constitute its antecedent, not to any one noun or pronoun in particular. And when the word which is used like this, we can’t really say that it is acting as a relative pronoun, not only because it doesn’t have a noun or pronoun as an antecedent, but also because it is not introducing a subordinate clause, something all relative pronouns do. In other words, a grammatical X-ray of the sentence would show that both a coordinating conjunction and a demonstrative pronoun are missing from view: He explained as best he could why he was late yet again, and this in the end was not enough to save his job.
Our conclusion, then, is that the sentence may stand grammatically as written. But we should also notice that its style, its dress, is a bit uncoordinated, at least as it appears here in isolation and out of context: the second half has more color, more dramatic energy in it than the first, and the simple comma separating the two clauses might be judged too weak to mediate the contrast. But a dash could do it, and that one punctuation change is enough to make the entire sentence more presentable: He explained as best he could why he was late yet again—which in the end was not enough to save his job.
Sentences are ultimately about ideas, and we can be led astray by concentrating only on individual words. Sometimes we have to step back from a sentence we doubt, look at the clauses of which it is composed, and then ask how those larger sections work with other words. And sometimes we’ll be surprised.