If you recall from the tale's beginning, the whole reason it manages to spread is because the country of origin, in this case China, had more or less local inefficiency followed by cover-up to save face for the government. Under those circumstances, and probably very few others, a zombie outbreak would be possible. If zombies are the last thing on your mind, as they would be if the Chinese government were to cover it up (they could pretty effectively prevent news of it spreading what with owning the media), your first reaction is not to shoot everyone in the head. If you were to see a zombie in the early days of their being undead, they would look mostly human, albeit diseased. It's why it's mistaken for a variation of rabies early on. The most likely response from the average person would be to either call for an ambulance or police and try restraining or otherwise incapacitating without taking measures which would harm the average human. Half the country would be dead and the other half inconveniently located by the time the general public realized what was happening. And once the most populous country on earth was mostly undead, with the rest of the earth having little more than an idea that some strange disaster is happening in a foreign land, zombies have got a good foothold to go from. Also keep in mind, World War Z's zombies are somewhere between the fast and slow zombies based on their age. They start out with all the dexterity and speed of the original person (1 in 4 zombies can climb a ladder, as per the survival guide), only breaking down as the muscle fibers stop working without being able to repair themselves. There's also the 24 hour incubation period, allowing for quarantines to be breached; and in the early days of confusion, they would be breached all over the place; it spreads not only through bites, but through any sort of blood contact with the infected material, meaning no obvious external signs in many cases.
Sure, an outbreak is going to fail as soon as people realize it is a zombie outbreak; but until then, it will spread. Zombies main weakness is information; World War Z begins in such a way as to prevent people from knowing anything about what is happening.
It's also inaccurate to describe the book as 'in the end, we were defeated.' In the end, humans are still around and rebuilding, the zombies are hardly more of a menace than ground squirrels so long as proper precautions are taken, ect. The zombie outbreak didn't defeat humans; it simply takes a while to get rid of those which were wandering underwater or frozen in the ice. By the end, they are talking about systematically destroying any of the remaining zombies; even underwater hunts with harpoons and such in some cases. If that wasn't the case, the main character wouldn't be working for the UN, as there would be no nations left to be united.