When investors buy stock of a company they expect to get returns in two ways, one is as dividends that they receive. The dividends are a portion of the profits earned by the company. The other is a capital gain in the form of an appreciation in the value of the share.
Now, when a company decides not to pay a dividend, the profits that it has made are expected to be reinvested to increase capacity and the total asset value of the company. The share holders would then be able to sell the shares they have at a higher rate in the future.
By not giving dividends the company uses the funds saved to increase its value and in that way increases the price of the assets with its shareholders.
A classic example of a company that pays no dividends is Google Inc. The company came out with their IPO at $85 per share in 2004, presently the share price of Google is around $500 and they have never paid any dividends, because dividends are not directly related to stock price.