Good points have been made so far. If you have a net capital loss, that can be good for your current year taxes in a number of ways: this loss (up to $3,000) is deducted from your regular income at your regular tax rate (likely higher than your capital gains rate). It also lowers your AGI, which may improve your ability to qualify for certain deductions and tax credits (traditional IRA deduction, ACA premium reimbursement, child tax credit, saver's credit, student loan deduction, and more). Aim for a net loss of $3,000 each year (including amounts carried over from previous years) to maximize your benefit here.
There are some other long-term reasons why you might want to trade a tax break now for a deferred tax liability later. If you die while still owning the shares, your heirs will receive them with a cost basis equal to the fair market value on the date of your death. If you harvested losses along the way and invested the tax savings, your heirs will receive those shares resulting from the tax savings, and nobody will ever have to pay taxes on the gains in the intervening years. If you plan to do some charitable giving, you get to deduct the full current value of any long-term shares you donate. Your cost basis doesn't matter here. Harvesting losses and reinvesting the tax savings means you will have more shares in your account and will not be paying tax on any of the gains for the shares you donate.
Even if the tax rate is exactly the same for the capital loss as it is for the future capital gain, harvesting your losses and reinvesting the tax savings can be quite beneficial.
Assume you're in the 15% tax bracket now and forever, for all types of income. Suppose you bought 100 shares of a particular fund at $20/share ($2,000 total investment), but the share price has since gone down to $10. If you do nothing now, waiting to sell until you're retired and need to withdraw some of your money, If you harvest your losses, you'll get $1,000 from the sale of your shares and will also lower your tax burden by $150 (15% of the $1,000 loss). Invest that $1,150 in a very similar but slightly different fund to avoid wash sales. If the price goes up to $40 by the time you retire and want to get your money out, the gross value of your shares will have risen to $4,600. Your cost basis is now $1,150, giving you a $3,450 capital gain. You pay 15% of this gain ($517.50), leaving you with $4,082.50 after taxes. What if you didn't harvest losses and just held on to your original shares? You would have shares worth $4,000 gross, with a $2,000 capital gain. After paying your $300 in tax, you're left with $3,700. Harvesting losses leaves you with about 10% more money in this scenario, with constant tax rates. You do much better than this when your tax rate goes down during retirement.