If you mean why does he sleep with her, the answer is because he didn't know she could get pregnant. The incidences of vampires impregnating humans are rare, and kept mostly in secret; so Edward has no idea that pregnancy is an issue for the two of them. He and Bella consumate their marriage because that's what married people do. Later, he feels guilty for accidentally hurting her, and it takes him a while to feel comfortable sleeping with her again. But throughout the whole thing, he never imagines that pregnancy is an option. When Bella figures out that her nausea and strange dreams might be the result of pregnancy, they are both shocked; no one had considered the possibility. Without having prior knowledge of the possibility of pregnancy, neither of them would have considered the danger to Bella.