Both questions are the result of severe misconceptions, partly due to how accounting deals with dividends.
In double-entry accounting, when the company pays out a cash dividend, the retained earnings account is debited and the cash credited, reflecting a reduction in the retained earnings balance and the cash balance. However, the debiting of the retained earnings or accumulated profits balance is an accounting charge. Dividends are, and have to be, paid out from cash.
Going back to answering the first two questions at the start of this article, a loss-making company can still pay dividends as long as it still has cash on the balance sheet. With respect to the second question, retained earnings reflect the accumulation of accounting earnings over time but not necessarily cash-generating ability and cash availability.
It also brings to the table an important fact: The dividend payout ratio has always been and is still calculated wrongly. The denominator in the dividend payout ratio should be free cash flow, instead of accounting earnings.
It is the same issue with the return on assets calculation (ROA). ROA is meant to be differentiated from ROE by the fact that ROA is a pure operating measure independent of financing. The denominator in the ROA calculation should be operating income instead of net income which reflects financing decisions with the deduction of interest expense. In recent years, return on invested capital has been gaining in popularity over ROA and even ROE as a measure of company value creation.