If a company earns a far superior return on equity than elsewhere in the market, it would be beneficial for investors if the company didn't pay a dividend and reinvested that money back into the company.
Investing in companies with high dividend yields isn't a foolproof strategy, as the returns on capital invested of that company may be quite low. For example
A company has the following: $1 million in cash, a 5% ROIC, and stable earnings of $2 million annually (hasn't changed for 5 years).
This company earns a poor return on invested capital (only 5%), so its beneficial for the money to be distributed to shareholders, as they can invest it elsewhere in the market.
They may pay a strong dividend, or even a special dividend which is great for shareholders, isn't it?
It's actually not a good sign. This is telling us that this company had heaps of excess cash, and their business model produced inferior returns. They couldn't invest that $1 million in cash into their own business, as it would have been a waste of capital.
Let's look at the same example, but with one change: ROIC of 15%
This time, the company doesn't pay any of the $1 million in cash, instead it reinvests it back into the business.
Earnings of $2 million in year 1, will become earnings $2.3 million in year 2, $2.65 million in year 3......
Eventually in year 10, if ROIC remains constant earnings will equal a whopping $8 million.
(In the real wold, the above is only possible with impenetrable barriers to entry, otherwise every man and his dog would open a business in this field that earns 15% ROIC)
The first scenario is to be avoided; companies who don't earn good returns on their capital might provide steady income for investors for a few years; however their earnings will decline over time, as they've spent years paying out earnings instead of reinvesting.