According to an article I read about the P5 and it's development for mid/late 1970s European Police and Military trials, it was to facilitate clearing the firearm should it jam. From a right-hand shooters point of view it is far simpler to turn the gun to the left (ejection port now down) and rack the slide with the left hand to clear it.
With the ejection port on the right, it is awkward to turn a "normal" semi on it's right side (ejection port down) and then rack the slide with your left hand. Your right and left hands are both now at crossed and awkward angles.
Those Germans, (Walther specifically), were clever in their thinking, unfortunately, tradition wore out, and no one picked up on their cleverness.
I recently obtained a P5. It is a great shooter, very mild recoil and wicked accurate. Looking for a P5C now!
Regards,
James