We should always watch out for posts done to promote an agenda. I'm not sure that it's much worse if both question and answer are from the same person. It's quite possible to generate the same problem with just a question. I've already seen a question where someone asked how to do something. My personal response was that you shouldn't do that. I squelched it because the technical question was challenging even if the example was flawed. But someone else might give a less technical spin to a similar question and draw a close for being too opinion-based.
Also consider the sock puppet problem. If we do some kind of ban against self-answers, what's to stop someone malicious from making a second account and answering with that. At least if they self-answer, we can see that it's one person.
It's also worth noting that self-answerers face increased risk. It's comparatively easy to not realize that your question is unclear if you are the one answering it. Putting your question out for others can lead to better feedback that allows you to improve the question. Also, both question and answer can easily be downvoted if perceived as agenda setting. Or someone can downvote the question because they don't like the answer.
I'm not sure that this problem requires a general rule. While bright line rules are easier to enforce, they can also be unfair and punish legitimate posts. Take the example of someone who's struggling with a problem, posts a question, relaxes from the problem, and realizes the answer. Should that person wait another day or two to post? Can we expect a new member to understand the rules well enough to be aware of that one?
It might be better to take things on a case-by-case basis until such a time as it becomes common enough to demand a rule. If it never does, then it would seem that it would be just as easy to always take things on a case-by-case basis.