Common stock in a company represents ownership rights in that company.
If you own stock of a company you become a shareholder with certain rights. Among other things, you are allowed to vote during the general shareholder meeting on the company policy (e.g. who is on the board of directors). You are also entitled to your share of the profits of a company. However, it is up to the general shareholder assembly (or other boards influenced by the shareholders - this may depend on the company's statute or from which country it is) to decide how much of the profits should be distributed to the shareholders.
If profits are retained by the company and not distrbuted to its shareholders, it does not mean the shareholder provides free money because the future value of the company increases through profitable investments of the retained earnings. At least, this is what the shareholders would like to see. Berkshire Hathaway (Ticker BRK.A) is an excellent example of shareholder value creation without distributing dividends.
Another remark. When a company decides to go public, there are at least two different options:
First, the existing owners (your business man X) can decide to sell stock at the stock market to new shareholders. That is, the current owner reduces his or her shareholding and receives the selling price for the common stock. No free money because the existing shareholder gives up some of the ownership rights.
Second, another option is that the company goes public by increasing its equity. In this case, the money from the new shareholders is paid directly into the bank account of the company. Existing shareholders don't receive any money. The number of shares owned by existing shareholders stays constant but the total number of available common stock increases. The existing shareholders now own a smaller precentage of a more valuable company. However, they also don't receive free money.
Finally, there are other types of stock with slightly different rights but at the end of the day they all do not create 'free money' for the existing owners. However, there are a few cases that might come close to that. For example, when the company WeWork tried to go public the first time it used some highly controversial policies to limit the rights of common shareholders which where seen by many as a very bad example of governance. At the end, WeWork failed.