Para português clique aqui.
The study of economics is, to a large extent, the study of the allocation of resources. That is, where should one allocate capital to produce the most efficient outcome?
In financial economics, this is exactly what happens. You are trying to allocate your resources (money) in the best (most efficient) firms. If you invest in an efficient company this company will produce more goods and services, which will lead to higher profits, and higher gains for you, compared to an investment in an inefficient company. By creating more goods and higher earnings your investment is also more likely to lead to an expansion of the company you invested in, generating higher salaries and more jobs. Therefore, by investing better, i.e. allocating your resources in the best firms, you also make the society better (the invisible hand of Adams Smith). Furthermore, stock markets also directly affect economic growth as it mitigates problems of moral hazard, adverse selection, and transactional cost, which reduces the costs of external financing. A sector that needs more external finance, for example, has been shown to develop faster in places with advanced financial markets (Rajan and Zingales, 1998).
Similarly, the most successful companies tend to be the ones that improve the allocation of resources in society the most. For example, uber allowed people to use their private cars (i.e. resources) to save the riders' capital and/or time. Without uber, the driver's car would likely be parked in the garage, the driver would be chilling on the sofa, while the client would allocate more resources paying a more expensive taxi or just walking because a normal taxi was too hard to call. And Uber did this improvement of allocation of resources for hundreds of millions of people, some who were unemployed, some who just wanted to make some extra cash at night or during the weekends. They got the driver's inefficient resource (the car) to provide a service some clients could not or would not get. This is a huge allocation of resources improvement and it is not surprising that Uber is now worth dozens of billions of dollars. The same happens with Airbnb. It allowed millions of people to allocate their inefficient resources (vacant bedrooms) to people who were looking for cheap accommodations.
The Social Value of Stock Price Information
As Nobel Laureate Myron Scholes points out, the stock market prices have valuable information on risk and expectations. For example, stock market prices predict political elections winner with great accuracy (e.g. Jensen and Schmith, 2005). Stock market prices are seen as a leading variable to economic growth. If the stock market collapses today, a couple of weeks/months from now the economy should also collapse. In other words, stock market prices foresee future events. Why is this important? The free market pricing mechanism massively improves the allocation of resources. For example, socialism (i.e. the system in which all means of production is controlled by the government) to a large extent failed because it could not use free market (i.e. capitalism's) pricing information to allocate the resources where it was most needed (Von Mises, 1920). Capitalist companies can allocate precise amounts of capital based on supply and demand prices. In other words, if the demand is high and the supply is low the value of the good or service is high because it is a well desired good or service. The higher the price, the higher is the value of the goods or services. The lower is the price, the lower is the value of the goods or services. Governments are much less efficient, especially if all means of production are owned by the state because then one only has internal transfer (i.e. there are no supply/demand forces in play), which breaks the valuable information contained in the free market prices (Hayek, 1944). For example, socialist governments often paid people to be just standing in the middle of businesses. These people were neither helping with any administrative duty nor were security guards, they were just standing. In a capitalist company, this would never happen because pretty much no one would pay someone to be standing in the middle of a business and doing nothing. Consequently, socialist countries had major inefficiency problems like this "standing staff" example illustrates leading to a huge loss of wealth. The problem of not allocating resources where it needed to allocated was part of the reason that led to the eventual collapse of the Soviet Union and the Fall of the Berlin Wall.
Thus, investing in the best assets not only generate greater wealth to you but also helps to increase salaries and create new jobs. Additionally, your effort to make the best possible investment contributes to set the correct prices in the economy. This provides valuable information for the whole society on how to invest their capital, improving their allocation of capital, which in turn creates further social benefits. In other words, by investing you make the whole society better off.