GPS, and compass heading error

Having the compass correctly mounted ought to be a one time work. Having it calibrated is obvious. Why try to make a second solution?
The aeroplanes I flew had a magnetic compass. Of course the various installations surrounding the compass affected the reading. That was compensated by installing small magnets to balance the disturbing magnetic fields. Even then a correction table could be found. "For heading X, stear X + y degrees".