Packaging. A phone is absolutely stuffed with components, most of the market highly values thinness, so every mm^3 is jealously fought over. Putting the camera in the middle might mean making the phone bigger, having to shrink the battery, or putting antennas in less-than-ideal places. It's design trade-offs all the way down.