From what I've read, the role of the pinna is for sound localization, helping the brain to figure out where sounds are coming from. In real life when the things producing sound are moving or the listener's head moves relative to the things making sound, the brain can use the information from how the sound is reaching the left and right ears and the relative pinna gain differences (left and right) to localize/spatialize the sound even better than with a purely stationary emitter/perceiver system.
Pinna gain is due to the conical form of the pinna that causes reflections of sound to be redirected towards the ear canal. These reflections vary according to frequency and angle and when the reflections off the pinna are summed, an emphasis or de-emphasis on certain frequencies occurs at the ear canal opening. That mean's a person's pinna has a set of frequency responses that are different for different directions, horizontal and vertical.
My speculations: By bypassing the pinna with in-ear earphones, localization/spatialization information that can be perceived is just what is already in a recording (which I think is why IEMs tend to work particularly well with high quality binaural recordings). It's also why I think people are able to perceive a large over-ear headphone as having sound more outside-the-head than IEMs generally do. Some IEMs are able to sound more spacious and a bit more out-of-the head because, I'm guessing, they more closely emulating a listener's natural pinna gain. Even with over-the-ear headphones a lot of the sound from the driver does get directed straight into the ear canal and effectively bypasses the pinna... so the inclusion of the pinna when perceiving sound from over-ear headphones is not as significant as when listening to sound in a normal space, and binaural recordings do still have an effect when listening on over-ear headphones. I don't think that you can just ignore the different ways pinna gain is involved with the headphone vs IEM experience.