Here's why:
* "A" is an article, modifying the noun "while".
* "While" is a noun meaning a period of time.
Together, they act as a single unit, functioning as a noun in a sentence.
Example:
* I'll be back in a while. (Here, "a while" is the object of the preposition "in")