Where it began
At the end of the 18th century (1776), whether you were declaring independence from the British crown or swearing loyalty to King George III, your pronunciation would have been about the same. Back in those days, the American and British accents hadn’t yet got distanced.
When the British settlers started to conquer the American continent, they took away the current accent from Britain. Due to the geographical distance and the absent of FaceTime, there were no real ways to keep in contact with the mother country anymore for many.
The “how” – British accent vs American accent
In all reality, the standard British accent was the one that changed significantly in the last two centuries while the American accent stayed more or less the same. During the American Revolution, the English language started to change in Britain.
A new wealthy sector emerged during the industrial revolution. These citizens were born with a low birth rank and they were desperately seeking for a way to distinguish themselves from others. They wanted to show by speech that they were much more than simple middle class or lower middle class citizens. They started to use the prestigious non-rhotic** pronunciation in order to demonstrate their new upper-class status.
** non-rhotic pronunciation: Traditional English was largely “rhotic.” Rhotic speakers pronounce the “R” sound in such words as “hard” and “winter,” while non-rhotic speakers do not.
This manner of speech developed and later on become standardised by the newly emerged intellectuals (doctors, teachers, etc.) while the American continent’s English stayed more or less the same. The US English is still rhotic apart from New York and Boston (where it has become non-rhotic over time). They become non-rhotic due to the influence of British elite after the American Revolution.