in many cases IRL, those compasses also double as turn coordinator balls -- as centrifugal turning and forces and aircraft banking apply on the weighed ball, it's axial tilt relative to the casing can be used to verify correct turn balance
that's not a behavior commonly modelled in even the more specialized flight simulator software -- but it makes for quite a neat touch of realism, indeed.