I know there is a lot of accents/dialects in America. I'm thinking of more of Northern or Mid-Western. The more common ones you hear on the media.
The modern American accents all formed in America after colonization. Accents from around the UK and Ireland came together and went through a process of dialect leveling wherein certain features from some of the older dialects were retained and other features were discarded.
America was colonized at a time when non-rhotic (r-dropping) accents were much less common in England, which means America was primarily rhotic. Some places on the East Coast became non-rhotic thanks to extensive contact when non-rhoticity (still rare in modern Scotland and Ireland) became popular in England. Non-rhoticity is currently receding in the US, but is still spreading in the UK and is dominant in the Southern Hemisphere accents thanks to their later dates of colonization relative the US.
Some features of the various American accents seem to be homegrown. A fairly prominent change is the merger of the vowel in words like father, spa, balm with the vowel in words like bother, spot, bomb and the vowel in words like daughter, pause, lawn. Most dialects outside the US maintain all three of those groups with different vowel sounds. In spite of the advent of mass media, there are many other ongoing sound changes in the US, like the Northern Cities Vowel Shift, which are continuing to create new accents.
Why did these changes occur? Because language is just like a game of telephone going off in different directions. Speakers make mistakes of articulation or perception and over time these errors accumulate to cause sound change. Accents arise from mutation, just like species, and mutations are constantly occurring.