That's because the powers that be want the euro, but the people didn't. They were asked in 1992, 1993 and 2000; and effectively they said no to the euro every time (yes, I know; in 1993, the euro was specifically opted out, but the fact that it was approved when the year before a referendum
with the euro was rejected suggests – at least partially – that it was a rejection of the euro (among other things)). Denmark thus came into the EU with 4 opt-outs (one of which has since been rescinded (defence) and one which turned out not to matter (union citizenship)), and they can only be removed with referendum (see for instance the euro one in 2000).
Prior to the adoption of the euro, the Danish crown was pegged to the D-mark (since about the mid-1980s), because Germany was the biggest export market for Denmark (still is), and thus having a currency that's stable towards what the Germans are using has been good for Danish exports (less sure how relevant that still is). (Sidebar; had the original motivation of Alternative für Deutschland been successful and abandoned the Euro for a return to the D-mark (neumark?), it would have put Denmark in an awkward position.)