Why are many gastropods monoecious?

it is because of hormonal changes at different stages of their life cycle. many gastropods during their juvenile stage will be males and as they get older they will become females. also you have to take into account that there are environmental changes that also affect their behavior.