However, Apple does not pay dividends. How does Person A or Person B make money from investing in Apple? At some point someone is going to have to buy $10 worth of Apple to pay A or B. That is A and B need a third party to realize the value of their investment.
Except that because Apple make a profit without paying a dividend, their total assets increase and your shares represent the same proportion of a bigger pie, so they're worth more. In practice shares are generally valued at a premium to assets, representing the expectation that the company is expected to make future profits. You could slice up the company and divide up the value of the assets between the shareholders, and this does sometimes happen when one isn't using its assets efficiently, but generally it's worth more as a going concern.
For example, there was an interesting period where Acorn Group plc, who created the ubiquitous ARM processors that are now used pretty much everywhere and spun this off as a joint subsidary with Apple, had shares in ARM worth more than their entire market capitalization. Acorn Group was bought and split up as a direct result of this.
Bitcoins are different in that they're just numbers in a database; there's no underlying assets and certainly no-one doing useful business using said assets. Or to quote another /.er:
Bitcoin is like a stock market with a single stock, for a company with no assets, and paying no dividends. Would you rush to pour your money into that?
Also, an important distinction between the two is that Apple's value is not simply "what it does", it's that they can take their assets and use them in a way that makes money. Bitcoin's value, on the other hand, lies solely in the fact that you can find someone else willing to pay you for the bitcoins either in fiat money or in goods. The two are not quite the same.