I understand the basics of what a wash sale is, and in particular that it prevents an investor from realizing a capital loss through a temporary sale of a security in order to offset a capital gain. However, after much Googling I'm unable to understand the justification for the rule. Why does it exist?
Note that "to keep an investor from lowering their tax bill" is not an explanation. There are lots of things investors can do to lower their tax bill and they aren't all outlawed. Ideally, tax law is designed to collect the appropriate revenue from the appropriate people (or disincentivize undesirable behavior) while minimizing market distortions.
If an investor makes $X in one year and loses $X in another year, there's nothing untoward about them trying to move those into a single year so that they cancel and no taxes are owed. (Zero taxes makes sense when there are zero net gains; this is the justification behind all sorts of exemptions that carry-over from year to year.) But currently, if I realize a capital gain in the first year and I've also got an unrealized capital loss in another security, I'm forced to either pay taxes that year despite zero expected gain or to reduce my exposure to the loosing security for at least 30 days. Why inflict this distortion? What behavior is trying to be prevented?