The American people have always been divided. Until semi-recently (~1960s) the political parties didn't sort themselves neatly on these divisions but over the last 30-40 years they have.
To be tribal/clannish/insider-outsider also seems to be an innate human trait.
Ezra Klein wrote a good book on both the (US) political history and various psychology studies on it: