She could be incredibly charming, and by the time they met he'd mastered the art of making a good first impression. I'm quite sure the skills that made them good at public appearances helped create a situation in which both of them initially saw promise for a connection with the other.
The tricky thing is that they both, especially at that time, seem to have been the sort to "live in their heads," so to speak. What I mean by that is that they seem to have kept quite a bit of their thoughts to themselves as they tried to present the "correct" front to others, even within their own family. To hide their vulnerabilities, as it were. It's a trait that Charles certainly would have learned while trying to please his father as a child (a common side effect with father and son have very different personalities; I'm not one who calls Philip mean or cold, rather just a difficult match for Charles' more senstitive nature). It's a mindset that, when it goes to toxic levels, can manifest in something harmful like Diana's bulemia.
But if neither was able to be frank and honest about their needs, and if the connection never developed beyond that initial charming each other phase, then of course it was a recipe for both parties getting frustrated by the other not recognizing, much less providing, what they most craved.
In some ways Charles was lucky because there is a long tradition of royal men finding an outlet in mistresses. There was an established pattern to follow and a certain degree of acceptance that he knew he could find by taking that route with Camilla. Even if it was no longer ok to be out in the open about affairs, he could take comfort in the knowledge that his caste would react with a certain attitude of, "ok, this is not ideal, but it happens sometimes."
Diana, on the other hand, had no accepted outlet for her frustrations. While he could step away from their dysfunction and find his even keel through another relationship, she was expected to just suck it up and bury her feelings. That she was on less even footing to start with surely exacerbated the marital problems on her end. I mean, she came into the marriage not only young but naive for her age, in the midst of an eating disorder, with a fairytale "happily ever after" image of marriage that was unfortunately not able to be tempered by a real life example of a healthy one (thanks to her parents' messy love lives) and then found herself in a not-functioning relationship with no healthy outlet for expressing her discomfort. Of course she became a powder keg.