Because "машина" becomes "машин" in the genitive plural form. Numbers ending in 5 and up and 11-14 require genitive plural.
Ha ha. Russian is so crazy. I love that some numbers require a different case than others. It's as if someone's trying to make up rules just to make it more difficult.
There's an easy way to learn:
четырЕ (vowel) - машинЫ (vowel) двЕ (vowel) - машинЫ (vowel)
пяТЬ (consonant) машиН (consonant) одиннадцаТЬ (consonant) машиН (consonant)
If a number ends with vowel, then a noun ends with vowel too. If a number ends with consonant, then a noun ends with consonant.