Two reasons. One, Denmark was useful as an air or ground staging area for the invasion of Norway(you could say it was... in the way). Two, Denmark controlled the vital access into the Baltic Sea, the capture of which would turn the Baltic to an Axis lake.