However, later we learn that the reason the compass doesn’t point north, is that the holder isn’t looking for north.
It’s dismissed at the beginning of the first film as a “compass that doesn’t point north,” an indication that Jack Sparrow is something of a joke as a sailor.
The compass is magical, and it points toward that which the holder most desires, be that treasure, love, or really anything at all.
Whatever happens in these movies, the compass is the thing that helps drive the characters toward the action.