I understand why a criminal defense lawyer would not represent himself in a personal injury case, or a patent attorney would not defend herself against criminal charges. But why wouldn't a criminal defense lawyer defend himself in a criminal case, or a personal injury lawyer represent herself in a personal injury case?
Before you act, it’s Prudence soberly to consider; for after Action you cannot recede without dishonour: Take the Advice of some Prudent Friend; for he who will be his own Counsellour, shall be sure to have a Fool for his Client.
Conventional wisdom has strongly disfavored this since at least 1682 when William De Britaine made the statement above in his book “Humane Prudence, or, The Art by which a Man May Raise Himself and Fortune to Grandeur”. Other notable figures have reiterated that advice since then.
The modern language of the saying that "A man who represents himself, has a fool for a client," is often attributed to Abraham Lincoln, although the attribution is probably false.
Practically speaking, one reason is that it doesn't work very well to elicit testimony from yourself as opposed to a third-party at trial. Another is that a lawyer is stronger when the lawyer's personal credibility isn't subject to being questioned in the case. A third is that it is hard to exercise independent judgment in an accurate fashion when you own case is involved. A fourth is that negotiations are often easier when made through third-parties.
This said, lawyers do routinely represent themselves in areas where they have expertise anyway. It is arguably unwise, but it is rarely, if ever, legally prohibited or improper. Indeed, generally speaking, everyone has a legal right to represent themselves without a separate lawyer. Sometimes the cost or the concern about trusting someone else with their own case will prevail over conventional wisdom.