Condoms when used correctly are very safe. The problem is that a lot of people don't use them correctly.
A lot of pregnancies result from incorrect usage ranging from things like not putting it on right (and so risking tears, or having it fall off), to ignorant ideas like putting it on first close to ejaculation.
Checking the source, it says that 18% of all the unwanted pregnancies where using a condom as contraceptive method, way different than 18% of times using a condom end with an unwanted pregnancy.
That's really surprising. What is methodology did they use to get to that number?