Confused

I don’t understand how people get pregnant on the pill after claiming they used it perfectly?? Is there any scientific reasoning as to why that could happen.