Why IUPAC name this amine is written as 2-methylpropan-2-amine and not as 2,2-dimethylethanamine?
The basic principle in nomenclature is to look for the longest carbon chain: here it is the chain with 3 carbon atoms so the suffix prop; since it is an amine connecting to the carbon 2 it gives the suffix propan-2-amine.
As you have a $ \ce {CH_3} $ group grafted in position 2 of the main carbon chain, you must add the prefix 2-methyl
So you have 2-methylpropan-2-amine.