I've thought about this myself, and with the help of my physics professor, have come up with this: the side of the fuselage is simply the best place on the airplane to take a static measurement. On the front, there is ram air compression; on the rear, much lower pressure; the wings have their obvious pressure differentials. We also indentified the need for a smooth airflow past the static port for steady readings, which also favors the side. The length of the tube connecting the instruments to the static port would seem to matter as well, all favoring the side of the fuselage near the cockpit. It may not be the perfect place, and the slipstream may cause but as long as that distortion is known and be compensated for, it is not a factor.
There are likely other factors I missed, and I'd welcome any additional info.