The Bovaries are a couple with conflicting personal issues that do not enable them see life for what it really is. They, within themselves, are prone to fantasize about their realities. Then, as a marriage, they allow for the fantasy to exist by recoiling back into the comfort zones of their imagination.
In the case of Charles, he knows exactly here he is coming from: as a child he was bullied. Growing up, it was a challenge for him to learn. As an adult, he had to overcompensate her lack of energy for life and did his best by trying not to get into any kind of trouble. He was a purist in terms of bland determination.
The only time when fantasy struck Charles was when he met Emma. In her, he saw all the passion he had lacked from life, because she, herself, was quite a passionate spirit (albeit not to him). In his fantasy marriage, Emma is a beautiful woman who does her best as a wife even if it is the minimal.
On the other hand, Emma also married Charles under a fantasy spell. She had not yet awoken to the passionate adulthood that awaited her and Charles was ill-suited for her tastes. She would read French novels and wish to be an aristocrat with money. She began then to try to fulfill her dreams by taking lovers and developing an obsession with money and having things that she cannot afford.
When reality struck and she found herself helpless, bankrupt and left out of all of her lover's lives, she could not help but killing herself, still under the notion that she was deserving of something better.