The classic finance answer--which is indeed perhaps zero in the case of Alphabet--is that the value of a stock is the net present value of its dividend payouts. Buybacks complicate that simple formula as do a lot of other things but, in theory, a share of stock does entitle you to a share of the profits of a company.