Stocks have long outperformed bonds but are also more volatile than bonds. In case of a corporation’s bankruptcy, if you have preferred stock, you will have higher claims on assets and earnings compared to common stockholders. But no voting right. In case of bankruptcy, bondholders are always favored over stockholders.
Not all companies pay out dividends, but some others reinvest profits into the activity to be able to grow the share prices. Some others also decide not to pay dividends as a strategy.