Financial markets

What is the primary economic function of price discovery in a financial market?