In most aircraft, the standby magnetic compass is mounted well above the main instrument panel, usually above the central window post, in order to reduce interference. In the three piece window of the MD-80 (without a central window post), this is not possible, resulting in the different location for compass.
All the Douglas jet aircraft has this type of mounting. According to this thread, the compass was first mounted on the instrument panel, which resulted in severe interference, resulting in its relocation. From the thread:
I understood that, early in the 60's, the compass was relocated in all DC-8 production due the three section type of the windshield (the compass has a lot of error/deviation at the center of the glareshield panel).
Note: I'm not able to find original documents supporting this. All the documents I can get simply instruct to check the compass using mirrors in the glare shield.
This design decision was used in all the later Douglas models, DC-9, MD-80/90 right upto Boeing 717 (which was developed as Dc-95); incidentally, all these models used a three piece front windshield devoid of center post.