It can be appropriate to retag a question to use tags that the asker wouldn't have thought of before reading the answers. If the asker's problem is a well-known one and the solution intrinsically calls for concepts that the asker didn't know about, then adding tags corresponding to these concepts is warranted.
Fictional example: someone asks whether it's possible to generalize regular languages and finite automata to parse nested parentheses, with the tags formal-languages automata. Answers will naturally mention context-free languages and pushdown automata. Adding the tags context-free and pushdown-automata would be reasonable, because the question is also useful for people who do know what PDAs are but not their applicability to parsing parentheses.
Strictly speaking, tags should not be driven by answers. For example, tagging a question about a concept that an answer describes in detail, but that other good answers to the question might not mention at all, wouldn't be appropriate. But the choice of tags can be driven by more knowledge about the question than what the asker has. Tags are for everybody who might be looking for the question.