I think it's likely we are in a simulation. Either as a research project or possibly it exists to build a perfect society. If you want a perfect society you need good people. So we live 4 or 5 simulated lives where we occupy different social strata and where we deal with different societies that are unfair in some particular way. So you have lived multiple lifetimes, right now you are a man, you will also live as a woman, be rich, and poor. You may even live a life as your own spouse but with no memory of your previous experiences. At some point you come out on the other end and have all of these experiences when you wake up in your real body.
The purpose of this would partially be to create well rounded and empathetic individuals, and partially so that you can be exposed to societal problems from a variety of perspectives so that when you get introduced to the laws/social structure of the real world you have a clear understanding of why that system is a good system.
Even if what I described is not true it could be the basis for a secular religion with an afterlife.
In a society where we all had the experience of living an entire life as a man and woman, gender issues I think would be non existent or completely different.