If you consider the unrounded frontvowel inventory in Danish to be divided in four: i - e - æ - a, you'll see that it is a question of openness. /a/ is one degree more open than /æ/. Disregarding length, think of the English vowels in Ben and ban or ten and tan.
There is, however, a tendency in modern Danish - younger speakers / Copenhagen dialect - that /a/ in words like Hansen is narrowing towards /æ/.