Well, see things from a 12 year olds point of view. When they become aware of their sexuality they look to kids somewhat older than themselves, someone more experienced. At least when I was 12 that was how things worked, maybe things have changed now I don't know. I remember very well becoming suddenly interested in girls when I was that age, but, the problem was that the girls we were classmates with had zero interest in us, they wanted older boys. The boys were more interested in girls that looked like women as well, they also wanted older, but of course older girls had less than zero interest in us. Girls don't face that barrier though, so you see situations like this one. At that age you look to where you want to be, which is more "grown up", and not with your peers who you see as children.
I think it is pretty normal for girls that age to have male friends older than them, and for an outside adult observer even a few years might seem a lot, but that isnt how it appears to the kids involved. At 18 this guy is pushing the limits but something like that could happen if there is a mutual friend at a bridging age (like 15 or 16).
I think the irony of all of this though is that in this case, if she was pregnant, the possibility exists that she might have been killed in a panic specifically because of the laws against that sort of relationship. And if that is the case, it would be the greatest shame of all because it would be so unnecessary.