Primarily because men have always viewed women as the "weaker sex" historically. They were treated like children at best and property at worst. No where were they considered equal.
This probably goes back to the "cave man" days all through various religions as well women are not portrayed as being "equal" to men.
Even now the Catholic church does not allow (women) to become priests.
King Solomon is said to have had 700 wives and 300 concubines.Can you imagine any woman in history having 700 husbands and 300 "boy-toys"? Men made the rules!
Having said that women are not the only ones who have faced social injustice and discrimination. We witness it occurring to people of different races, religions, sexual orientation, and even age discrimination. The Holocaust was about getting rid of a whole race of people in Europe and around the world.
Nevertheless some progress have been made which cannot nor should not be ignored.
There was a time in the U.S. where women couldn't vote.
Laws have been created to fight and punish people who engage in discriminatory acts. The results are not always to our satisfaction but that's life. 2017 is much better than 1717.
Gradually things will (improve) but there will Always be discrimination because laws don't or can't always change the (hearts & minds) of every individual.