Assume that a corporation was formed three years ago with $500,000 in starting capital. In each of the first three years, it earned $100,000 and did not pay any dividends. It now has $300,000 in retained earnings. If the company is operating as a going concern, is it allowed to pay out more than $300,000 in dividends? If the company paid out more than $300,000 in dividends, the equity remaining in the company would be less than the initial capitalization ($500,000). If the company happens to have debt, wouldn't the creditors object to this?
There are (at least) 3 issues at play here:
What is the jurisdiction, and what corporate law is in play? This will likely set some basic threshold of legal acceptability [the typical answer would often be 'no, you cannot legally pay out more dividends than retained earnings]. The general intent of these rules would be to (a) protect creditors of the corporation; (b) protect minority shareholders; and (c) protect the general tax and economic interests in the area.
What exactly do you mean by 'dividend'? Are you including the potential for "Repatriation of capital" or similar means of returning share capital value through distribution to shareholders? Different law will apply, that might also interact with relevant tax consequences.
You mention recourse for debtholders - those debtholders may have specific contractual requirements that the corporation must adhere to under contract law. ie the bank might have a clause within the debt agreement that 'dividends shall not be in excess of 90% of cumulative net income over the past 5 years'.
So yes, laws do exist, but what they are and whether they would allow for your example to occur, would require more information.
Normally if a company cannot repay its bondholders or creditors then it enters bankruptcy and its creditors take ownership of the company. The original shareholders lose their investment and the creditors become the new shareholders.
Creditors would also likely ask for collateral for their loans when originally making them. Liens on company owned equipment etc. They may send in bailiffs to recover any amounts owing who would seize any company assets they can find. They might also demand restrictions on the amount of dividend payments the company can make precisely to prevent the company getting into this state.
Of course the creditors may be the original owners of the company in which case it's their money so if they destroy the company then they won't receive any future profits it might make.