Someone asked me this question today and I didn't really know how to answer the question. When something is last, the definite article should precede it because there's only one last place.
- Anybody can ask a question
- Anybody can answer
- The best answers are voted up and rise to the top
If you Google the phrase you'll find at least a couple of dictionaries that define "as a last resort" "as the last choice," while others offer "in the last resort" as an alternative phrase. Thus, I believe it is simply an idiom in widespread use, and there is no sound grammatical reason to use the indefinite article.
The question said:
But that's not the case here.
These are hypotheticals, as they have not yet happened. So there can be more than one possible last resort.
If you have a choice of mutually exclusive last resorts, then each is a last resort, while still being last. This will be the case if only one of a choice of last resorts is possible.
But you cannot do all three as they exclude each other, so any will be the last resort if it is used, but whilst under consideration, each is a last resort.
Adding to Mark Hubbard's great answer, if there were numerous resorts that were used before the last resort, it would be correct to use as the last resort. The noun resort is a mass noun that takes an indefinite article only when it is used to mean:
The second example sentence didn't use the definite article the. It is obvious that the noun resort is something that you "turn to and adopt (a course of action, especially an extreme or undesirable one) so as to resolve a difficult situation".
You don't resort to multiple resorts (extreme or undesirable courses of action). You resort to only one resort.
The indefinite article a in the idiom means one single:
The adjective last usually requires the definite article, but there is an exception when it doesn't mean:
A resort doesn't come after another resort and is not final. That's why the definite article is not necessary.
If you compare the idiom with as the last choice, the distinction would be clearer. You had multiple choices before you take the last choice, but you didn't have multiple resorts before you take a last resort.
Note: This is a broadly used idiom and sometimes an idiom can't be explained using a grammatical rule or dictionary definition. As some commented, it is as idiomatic as in the last resort and as the last resort and why one idiom uses a and the other the is difficult to explain.
Even thought the linked Ngram Viewer for "suicide as a last resort" and "suicide as the last resort" shows only "suicide as a last resort", if you Google them, you get 12,800 hits for the former and 28,000 hits for the latter.
[Oxford Online Dictionary]
"Last resort" refers to a course of action taken when all others fail or no others are available. "Last" in this circumstance refers to something along the lines of "this will definitely work, but may have bad side-effects," "if this doesn't work, nothing will," or "once we try this, we won't be able to try anything else." It implies a lack of desirability in the option. "Last resort" thus doesn't refer to a particular action, but a class of actions. Multiple last resorts for a single problem can exist.