Because the people who are consistently right will consistently win money and will make bigger bets which move the price more, in the limit case making the price converge on the true probability of the outcome.
This is the theoretical underpinning of prediction markets.