When financial markets are (weak-form) efficient, the prices paid for stocks reflect past prices and the trading history of a security at each point in time and thus reflect the true value of stocks and result in the optimal allocation of private and social resources.