Edna married Leonce for several reasons, although she considers that they were all "an accident". First, she did have a slight connection with him as far as sympathy and animosity. Second, the man had a lot of money and a tendency to spoil her. Third, she wanted to make her father, the Colonel, angry especially because Leonce was of a different faith. Fourth, she was really thinking that she would eventually fall in love with him, and that she will find satisfaction in a lavish life. Unfortunately for Edna, she married being way too immature, and knew very little to nothing about life, herself, her sexuality, nor her nature. For this reason, she began a series of sexual affairs.
Was Leonce the model husband? Perhaps. He loved Edna, he lavished her with gifts, attended her every whim, and felt very proud of her. I would call that a keeper.
In chapter 7 of the novel it is revealed that Edna marries Leonce on "accident." That seems like a rather strange idea, but as the paragraph follows, the situation becomes more clear. Edna was actually interested in another man but Leonce was deeply in love and "presssed his suit with an earnestness and ardor which left nothing to be desired. He pleased her; his absolute devotion flattered her." Edna was pleased by the attention of this man partly because she didn't have the attention of the other man. She also thought they perhaps they had some things in common.
The most forebdoing comment in the paragraph though is what follows. It is revealed that Edna's father and sister where very opposed to Edna marrying Leonce, who is a Catholic. Edna seems to take great delight in doing exactly the opposite of what they expect, so she marries Leonce.
Another reason for marrying Leonce is that Edna thought then that by marrying a man who worshipped her she would "take her place with a certain dignity in the world of reality, closing the portals forever behind her upon the realm of romance and dreams." She thought this marriage would suit her and that she could maintain an emotional distance, but still have her place in the world.
These revelations are important to an understanding of Edna's character. She didn't one day decide she wanted out of the marriage and her responsiblities. She has had the seeds of discontent and a unique sense of herself since her childhood, and that explains much of her current attitude and behavior.
The answer is pretty simple here. Even though Edna says she married Leonce on "accident," she actually marries him because she is influenced by his flattery. We find this out in chapter seven:
[Leonce] presssed his suit with an earnestness and ardor which left nothing to be desired. He pleased her; his absolute devotion flattered her.
Edna has a wish of another suitor, but only has Leonce pursuing her. Edna hopes the two of them have at least a few things in common. Further, even though she has family directly opposed to the marriage due to Leonce's Catholicism, Edna wants the dream to cease to be a dream and become reality.
[Edna wished for a] certain dignity in the world of reality, closing the portals forever behind her upon the realm of romance and dreams.
I am going to add another idea here that isn't often mentioned. Edna is also influenced by the security of marrying Leonce. In short, Leonce has money! This is enough to keep Edna safe and happy (at least in some way) for the rest of her life. Despite the affairs she ends up having and her "awakening" to the world of sexuality, the security of marrying the Catholic Leonce continues for Edna as long as she stays married.