Asking your age isn't illegal by itself. ADEA makes it illegal to discriminate against workers age 40 and up based on age. Doesn't apply here.
In fact, employers can have legitimate reason to ask your age, such as background checks.
In fact, employers can have legitimate reason to ask your age, such as background checks.