Among the minimum equipment required for VFR and IFR flying, FAR 91.205 still lists the magnetic direction indicator as a must-have item. Don’t confuse this with the gyroscopic (or equivalent) directional indicator. That’s required for IFR, in addition to a compass.
Given the primitive nature of a magnetic compass, owners are often shocked at the impressive invoices it can generate when it fails. And compasses do fail. Ever have one that leaked its fluid down the front of the instrument panel? The idea is to address the health of a compass before it comes to that. Even calibration—which should be done regularly—can be a time-consuming project.