I think there are three separate issues in your post:
- Questions being closed for asking for legal advice when they clearly don't do that.
- Whether questions which do ask for legal advice should be closed or edited into a generic question.
- Whether legal advice questions should be allowed in the first place.
On the first point, it's unfortunately fairly common for questions to attract close-votes which don't make much sense. This applies to all stackexchange sites, not just law, and it applies to all close-vote reasons, not just legal advice. I'm not sure what can really be done about this other than encouraging people to carefully read the close-vote reason before submitting it. I usually comment on a question if it seems to me to have attracted an inappropriate close-vote and, if enough people upvote such a comment, that can be effective in bringing it to the attention of future would-be close-voters or can help with a re-open vote.
On the second point, I'm not sure that I entirely agree that "questions like this should be edited into generic inquiries rather than closed" (taken from your answer). This implies that it should happen in every case (or at least most cases) which would seem to defeat the purpose of having such a close-vote in the first place. Clearly the site wanted the close-vote to be used or they wouldn't have put it there.
It's probably a more reasonable argument that in some cases we should close and in some other cases we should edit. Arguing too strongly in favour of one over the other would mean ignoring the fact that the site made both options available and presumably intended there to be a choice between them.
My approach (rightly or wrongly) is to base it on how heavily edited the question would need to be to comply. If I can make a few minor tweaks then I'll usually edit. If I'd have to completely re-write the question and change big chunks of text then I still might edit anyway if I feel like it. However, I almost might vote to close since that is quick and simple. I don't think an editor should feel obliged to do a lot of work that the OP should have done to begin with.
If we always or almost always edited then we would be encouraging low-quality posts and providing OPs with no incentive to do better. We'd also be placing an increased burden on editors.
And more importantly, who cares? If the idea is to build a site that
promotes the diffusion of legal knowledge, what interests are
undermined by leaving this question in place?
This is different to the first two points because it isn't about how editors and close-voters should behave but rather requires a change to the site rules. Here's what the help page says:
Please don't ask questions seeking legal advice on a specific matter.
These are off-topic for Law Stack Exchange. While users generally
contribute answers in good faith, the answers are not legal advice,
and contributors here are not your lawyer.
There are two reasons I can think of for why this rule might be important.
First, it protects people who post answers from being sued for giving legal advice. This could be because the advice turns out to be wrong and the OP loses out somehow because they relied on it. Or it could be because giving legal advice is illegal in the answerer's jurisdiction. For example, in england-and-wales, while it is fine for non-lawyers to give most kinds of legal advice, it is illegal for a non-qualified person to give immigration related legal advice under Section 84 of the Immigration and Asylum Act 1999. Many non-lawyers might be completely unaware of rules like this and inadvertently commit a criminal offence by posting answers. Answering a generic question isn't advice, so it isn't caught by such rules.
Second, it encourages people who are seeking legal advice to do so from a qualified lawyer and not rely on advice from random strangers on the internet which might, and often does, sound very plausible and convincing but is actually wrong. This second point is a bit weaker because those people can simply frame their question generically to get around the rule, but it at least provides a small obstacle to doing so which might get them to think about how appropriate it is to rely on the answers.
Both of these issues can be worked around to some extent with disclaimers which make it clear that answers aren't legal advice, but I think risks would still remain in both cases.