The alternative being proposed sounds much worse: price control (based on ingredients?)? Not all products are mere sums of their parts, and some people prefer the premium experience regardless of the differences.
They aren't literally charging based on gender - but different brands targeted towards different genders offer different prices and experiences. If the products really are that similar, the other gender can buy the other gender's product no problem.