Capital doesn't just magically increase for no reason. It increases to the degree the business produces more value for its customers. Most business fail to do this, which is why most companies fail. Other succeed, and attract investors who want to put more capital into the business to help it grow more.
Starting a company that becomes worth $1M by creating $1M in value is a literally a capital gain of $1M for whoever owns that business.
Maybe the person who started that business wants to sell. 10 people buy $100k each in shares. Now they own the business. They hire a manager to grow the business and expand and create more value. Now the business is worth $2M. Those new investors created another $1M in value by hiring the right manager and making good decisions. This is another capital gain.
None of this is accidental or magical. Businesses that do well produce capital gains, and most businesses fail, and produce no capital gians.