What was the history of the Tailed Beasts (Bijuu) before the formation of the Hidden Villages?
After the death of Hagaromo Ōtsutsuki, the Tailed Beasts went their own way. Kurama's belief, that the tails was a measure of strength, apparently paved way for the beasts to part ways.

The humans regarded the Tailed Beasts as monsters and sources of immense power. They did not care about the live essence the Beasts had. 

To gain advantage during times of war, the humans tried to exploit the Beasts' powers. They only thought of the Bijuu as weapons of mass destruction. This in turn, angered the Bijuu and brought forth the hatred towards mankind.

From Tailed Beasts article:


  Over the centuries, humanity failed to recognise the tailed beasts as sapient individuals, instead seeing them only as monsters, demons, or mindless beasts worthy of fear and disdain. Because of their immense power, the tailed beasts were sought out by humans to be used as weapons in times of war. The beasts resented this treatment and came to hate humans, at times willingly becoming the monsters they were viewed as.


So, they were trying to lead peaceful lives away from mankind before the formation of Hidden Villages. But due to the constant provoking of the humans, they decided to fend them off by becoming what the humans thought they were.