There are at least two ways to look at this.
First, we can say that public opinion was divided because public opinion is always divided. Often, when we think about historical times, we forget that we are thinking about real people. We forget that they would have been essentially just like us. Thinking about our society today, can you imagine us all having the same opinion on anything? The people who were living at the time that Jesus was preaching were more homogeneous than we are in terms of things like ethnicity, but they were still people and would still have had varied opinions.
Second, and perhaps more important, we have to remember that Jesus would have been very hard to understand and to identify. We read the Gospels and do not really feel the wonder of it all because we already know the story. We know that the whole point of these books is that Jesus was the Son of God. This explains why he was able to do all the things he did. But imagine being there at that time and place and seeing some guy, apparently no different from anyone else, performing miracles. Of course people would have been trying hard to figure out who this guy was. They would have been trying to fit him in to categories they already knew of. It would not have been easy to see, like Peter did, that this was the Messiah.
So, there were differences of opinion because there are always differences of opinion and, more importantly, because the awesomeness of what Jesus was doing would have been hard to comprehend.