Equality is extremely difficult; there are always people who want to put themselves in positions of power and authority over others.

Different accounts of the conquest of Jerusalem by David, Joshua, and Judah: https://www.thetorah.com/article/the-israelite-conquest-of-jerusalem-in-the-bible-when-and-who