You also don't need to pay corporate tax when booking a capital gain on your shares, so the tax advantage is actually a lot more.
£1m in corporate income is taxed at 20%, so you're left with £800k after tax. Then you declare a dividend, and pay a dividend tax. That'll be 25-30%, so you'd be left with £800k - 30% = £560k in pocket.
To earn £3m (in pocket), you would have to generate approx. £5.25m in pretax corporate profit.
Whereas with a share sale, you will be taxed at 10%, meaning you're left with £2.7m (if you sell for £3m). A significant difference.
I live in Belgium, where the difference is even larger. Capital gains on share sales are tax free, corporate income + dividends are taxed at about 45%.