If $L = \{ a^{2^n} \mid n \ge 0 \} $ is not regular, then why there is a DFA thats accepts its language?
The definition of an automaton accepting a language is that it must


accept every string that is in the language;
reject every string that is not in the language.


Your automaton does 1. but not 2.&nbsp;&ndash; it accepts all strings of $a$s, but it's supposed to reject all the strings whose length is not a power of two.