Opinions please

So when me and my friend have missionary sex it hurts, but if we have sex from the side or if we do doggystyle it feels really good, any opinions why it’s like that?