To match shares sold with those bought. An investor may buy shares in a stock slowly over a number of years at many different prices. When he/she sells some of those shares, he/she identifies which shares he/she intends to sell. This is done to minimize his/her capital gains tax liability. For example, suppose an investor buys 5,000 shares at $10 per share and 5,000 shares at $20. If this investor later decides to sell 3,000 of her 10,000 shares at $25, she will likely identify the shares as the ones bought at $20. This means that her profit is only $5 per share instead of $15. That means her capital gains taxes will be less than it otherwise would have been.