In both scenarios, the shareholder can get the same amount of cash if they want it. Except with a dividend, they are forced to pay tax now.
I suppose there could exist a jurisdiction where dividends are taxed less than capital gains. I would be curious to know if there are any.
Australia has one of, if not the highest rates of CGT in the world.
ASX dividend stocks are popular with retirees in particular because the dividends are fully franked, meaning you get a credit for the tax already paid on the dividends by the company.
If you’re in a low enough tax bracket, this can turn into a tax refund if the tax the company paid exceeds your own personal tax liability.