Capital gains are taxed at 20% and can be offset against personal losses, whereas dividend income is typically taxed at 32.5 - 38%, and that's after the company issuing the dividend already paid corporation tax of 19% on their end.
From what you say, dividends seem like a negative thing taxes-wise, so why would any company opt pay them out? I’m sure there’s some intricacy there.
Most people get away with doing this because they use tax sheltered accounts, or the amount would be below their tax-free allowance.
Ref: "Accumulation units – the income tax loophole that never was" - https://monevator.com/income-tax-on-accumulation-unit/
More technical reasons follow.
The risk profile is very different. Rents, dividends, and interest payments all have some notion of a guaranteed payment. Your risk is primarily whether your counter party will be able to honor that agreement. This is why bond investing is often called "fixed income" because you know ahead of time how much money you'll make.
Asset appreciation has immense market risk. You need to find a buyer willing to pay more for what you paid for it. In the case of companies the economic risk are higher too: if the companies cashflows dwindle or debt increases the shares are fundamentally worth less.
This is why there are often tax distinctions between guaranteed income streams and capital investments: in theory, a government wants to encourage investment in risk and discourage printing guaranteed monthly checks. This does create a regulatory arbitrage, however, where companies can buy fixed amounts of their own stocks to guarantee some amount of appreciation in lieu of a dividend.