To tackle the relatively easy part of your question first, if you see a comment chain devolving into an extended discussion that does nothing to improve the post to which it is attached, flag the post for moderator review. Extended discussion, on any question, is discouraged and we will actively clean those up.
Regarding legal questions, it's really a two parter:
- Are all legal questions ill-served by being asked here?
- If not, is there a certain kind of legal question that's ill-served here?
To the first question, I don't think so. The Stack Exchange system can provide great answers, and there is a certain amount of community vetting in the form of voting, comments, and counter-answers, but it requires common sense.
If, for example, I told you that the best practice for implementing scrum in your job was to submit TPS reports daily that contain nothing but 14 pages of the letter 'K', I would hope you wouldn't do that even if my answer was the top-voted.
In the context of legal questions, common sense is always, always consult a lawyer. Asking a site devoted to non-lawyers who do not have an attorney-client relationship for definitive legal advice is obviously dangerous.
But that's not to say you can't ask about legal issues: it's akin to asking a colleague or a friend about their experiences in a similar situation.
Take the non-paying customer question, for instance: you might ask that question of a colleague, who might say something like "Obviously get a lawyer, but when that happened to me, this is what worked." That's the type of answer we want on Programmers.SE.
To the second question, the highly-specific legal question that can only be answered by a lawyer, like a question about being sued and asking for a legal interpretation for a defense, would be off-topic. We're not lawyers: we can't answer those.
I think there is always going to be a fine line between what constitutes regular, professional advice (on-topic) and what constitutes personal legal advice (off-topic). The standard should be, "would a reasonable person consider the question to be asking for personal legal advice?" If so, it's a candidate for closure.
One footnote regarding common sense: there are askers who appear to have the wrong set of expectations when asking legal questions, and both of the questions you listed appear to have this problem. A person who appears to think Programmers.SE substitutes a lawyer needs to be educated that he cannot use the answers given as a way to circumvent legal council.
To this end, it's similar to questions on Stack Overflow where someone asks how to do something insane, and the only correct answer is "Don't do that. Do X instead."
But the purpose of the Stack Exchange network is to build up questions and answers that can help others, not just the asker. So a misguided asker isn't reason enough to close a question.