curious question

so i know this may be a stupid question but i’m curious, you don’t ovulate when you are on the pill: therefore you can’t get pregnant. but yet birth control is 99.7% protective when taken perfectly, so how do you get pregnant on birth control if you don’t ovulate?