People in Jerusalem reason that they know where Jesus comes from, whereas 'when Christ cometh, no man knoweth whence he is.' Their expectation may sound surprising beside other Gospel passages that associate the Messiah with Bethlehem.
The difference is evidence of varied messianic ideas rather than a contradiction that must be forced into one scheme.