Because машин is the genitive plural. When the number for a noun is larger than 5 the noun takes the genitive plural. Three cars would be = "Три машини." When the number is less than 5. It takes the nominative plural, basically the normal plural of the word.
Is машин also masculine? Is машини also accusative plural as well as nominative? Are студенти/студентки accusative plurals?
Машина is feminine. Машини can be both plural in Nominative and Accusative, as well as singular in Genitive.
Студенти & студентки are Nominative plurals. The Accusative plurals would be студентів & студенток respectively.
Actually студентки can be also Genitive singular, for example:<pre>
Who did you hear it from? - Від кого ти це почув? I heard it from a (female) student. - Я почув це від студентки.</pre>