I don't understand the 30-day wash-rule. Someone please set me straight.
So let's say I purchase 100 shares of Hot Stock X, for $100 apiece. So $10,000.
Let's say that the stock goes down 50% on a really bad day in the market.
Let's say furthermore that the 30-day wash rule doesn't exist.
So I sell my 100 shares at a 50% loss, I claim a capital-loss of $5,000 dollars, and then a minute later, I repurchase 100 shares for the exact same price I sold them at.
Hot Stock X goes back up to $100 the next day on a really good day in the market. I then sell my position. So in a world without the wash-rule, I'm back to my original $10,000. I haven't lost or gained a penny, but I've "mined" a capital loss of $5,000 dollars out of thin air.
Except that I haven't of course, because after I bought the 100 shares the second time when they were down and rode the market back up the next day and sold, I recorded a capital gain on that trade of $5,000. So the capital-loss of $5,000 cancels out this capital gain completely. I've made no money in this case, and I have no capital loss to game the system with.
So what's the point of the wash-rule anyway? I read about loss-harvesting where you purposefully incur your loss and then repurchase the same securities on the 31st day afterward, but vis-a-vis this example, I can't understand what the point of that would be, nor indeed what the point of the wash-rule is to begin with. The capital gains you make on a security cancel out the capital-losses that you intentionally tried to "harvest". What am I missing?