The bug
If you look closely at a compass item (no matter whether it's an item entity or held by another entity), you will notice that the back side of the compass actually points into an incorrect direction. When it should point up, it points down, and vice-versa. When looking at the front side of the compass, it acts correctly.
The back side of a compass probably just takes the position of the needle on the front side and mirrors it, while it should flip it too.
To reproduce
Place a lodestone
Use a compass on the lodestone
Drop the compass
→ ❌ 50% of the time, the needle will point into an incorrect direction.
Videos
Compass items on the ground:
A husk holding a compass in its hand:
Confirmed in 1.16-pre2.