Why do we say "What do you do for a living"?
What does "a" (the indefinite article) imply in this context?
Solution 1:
In that context, "a living" refers to the subject's profession/job. So, that question is asking:
What do you do for your profession?
You can also say things like:
I build houses for a living. (Your profession is building houses)
I found this definition for living:
an income sufficient to live on or the means of earning it.
Source
The indefinite article is simply referring to the fact that there are multiple things that a person can do for their job. A definite article would imply that there is only a single thing a person can do to make a living.
Solution 2:
To my knowledge, it is a shortening of the phrase "a living wage."
People will also use this expression to say things like, "It's a living."
But, you can also say "I make my living . . ."
The short answer to your question: Living in this case is a noun. And, therefore needs the article to designate it as such, instead of being a verb.
If you asked "What do you do for living?" (Gerund of the verb) The answer would be akin to "Breath, eat, drink, etc."