The answer lies in the history and culture of the two clubs.
Why is AC Milan commonly known as “Milan”?
AC Milan, founded in 1899, was originally a Milan Football and Cricket Club. A cohort of English expatriates in the city established the eponymous football club, Milan.
Over time, the club dropped the “Football and Cricket” part and became known as AC Milan. The “AC” in the name stands for “Associazione Calcio,” which translates to “Football Association.”
Furthermore, “Milan” is the city's moniker in the Milanese dialect and in English, French, and Spanish.
Why is Inter Milan commonly known as “Inter”?
Inter Milan, on the other hand, was founded in 1908 as Football Club Internazionale Milano.
Italian and Swiss football players created the club, choosing the name “Internazionale” to reflect the club's international outlook. In other words, Inter emerged from the rejection of AC Milan's provincialism.
Nowadays, people often refer to the club as “Inter” for short. Interestingly, “Inter” moved into the home of AC Milan, the San Siro, in 1947 for practical reasons. The two clubs share the same stadium to this day.