The secondary market actually does serve a capital allocation function. It provides liquidity to the original shareholders, and to the people who bought from the original shareholders, and so on. This, in turn, encourages people to become original shareholders, and to provide capital to the company.
Illiquidity is one major reason that private companies sell for lower multiples than public companies of equivalent size.