Tolstoy believes that people have specific roles they're "supposed to" fulfill. Many of these notions are uncomfortable for modern audiences. For example: the nobility has been given land, so they should stay in the countryside and pay attention to agriculture; the peasants have been given a nature disposed towards hard work, so they should keep farming; and women should be mothers and caretakers because they are biologically able to give birth, and also have the spirits necessary to bear children and look after the sick. Consider Kitty and Miss Agatha's instinctive ability to care for Levin's sick brother Nicholas, or Dolly's natural bonding with the peasant women on her estate over childbirth. Tolstoy seems to view a woman's first responsibility to be to her family. Women who abandon these responsibilities – most notably, Anna Karenina – are in for a world of hurt.
Rather than always inscribing women into predestined roles, Levin is quite open regarding female capabilities.
Because Anna has deviated from "normal" female concerns (i.e., childrearing) in favor of devoting her life to Vronsky, she is emotionally punished until the moment of her suicide.