The problem is that Sharia was customary in that part of the world. It had been going on for thousands of years. But what Islam did was codify that degeneracy as the word of God and any attempt to change that barbarous culture as blasphemy, and prescribe it as mandatory on the whole world.
Actually, that’s the weird thing about Sharia: It’s the principle that Muslims should follow the predominant customs of the societies they found themselves in. Islam fundamentalists interpreted this as following the customs that Mohammed found himself in, but the much more reasonable understanding is that Muslims living in the West should Westernize, and that Islam should modernize.