There are several possible justifications for this distinction between capital gains versus ordinary income, and between qualified dividends versus normal dividends.
One is the "double taxation" problem that emerges for equity investments: a corporation may deduct its interest and amortization expenses (so, expenses of debt financing) before paying corporate income tax; but it cannot do the same for dividends it pays to shareholders or stock buybacks. This is inevitable, since if corporations were allowed to deduct everything from their income tax base, the tax would raise no revenue. However, this has the effect that stock returns are subject to double taxation. The dividends are first taxed before the corporation pays them out to shareholders under the corporate income tax, and then they are taxed again once the shareholders receive them under either the personal income tax or the capital gains tax. To see that this is a quantitatively plausible explanation, note that the effective corporate income tax rate paid by Alphabet Inc. in the year 2019 was %13.3, and this pretty much matches the spread between %25 and %35 that you mention in your question.
Another possible reason behind this distinction is the conventional wisdom that taxes are most effective at raising revenue if they are levied on relatively inelastically supplied factors of production. Both common sense and a large body of empirical work supports the conclusion that capital investment is much more elastically supplied than labor, and therefore a tax on capital both has stronger dynamic effects which reduce the amount of revenue raised from the static baseline, and also drives a wedge between saving and investment, which has deleterious economic effects. On the other hand, an increase in payroll taxes, if carried out uniformly at a fixed marginal rate, has little effect both on employment and the number of hours worked per worker.
This is certainly how the low long term capital gains tax rates are advertised by their proponents, but given the double taxation problem mentioned earlier, the correct question to ask might be why the short term capital gains tax rates are as high as they are. The commonly given explanation behind this distinction is that it's meant to separate "speculation" from "long term investment", or "financial" investments from "real" investment for tax purposes. These are fallacious arguments, however, and likely have the effect of depressing investment by reducing market liquidity. If there is a sound reason behind this distinction, I haven't seen it so far. It's likely that sound economic thinking is not the right mode of explanation to understand this (and similar) distinctions drawn in the US tax code.
These are, however, speculations on my part since tax policy in Washington rarely follows any coherent logic and generally doesn't make any sense to outside observers.