The reason for this pronunciation is due to the accent of the people from which it originated from, the Cockney accent:
1706, originally a contraction of am not, and in proper use with that sense until it began to be used as a generic contraction for are not, is not, etc., in early 19c. Cockney dialect of London
It was actually originally amn't, as can be seen here:
Origin:
1770–80; variant of amn't (contraction of am not ) by loss of m and raising with compensatory lengthening of "a"
The reason it is in popular usage today can be seen in this excerpt:
popularized by representations of this in Dickens, etc., which led to the word being banished from correct English.
"Ain't" is used because it is more popular, and also, it is easier to pronounce.