I agree with Skipton, could have written the post except my relationship history is different :)
I agree there is no "failure" in a relationship - it's not a test that you can pass if you act in a certain prescribed way, IYSWIM, it's a relationship between two people, it is two sided, and it's far more about the compatibility of you two than it is about what anybody does. Of course, there are things which you can do which are bad and things which are good, but to me those are very broad things (bad: compromise on your own morals, put up with things you are unhappy with, change yourself to fit the other person, put the other down, generally be an arse; good: communicate, listen, make other person happy, be considerate) - to take your example of going out and doing things together, that might be something that he has learned is important to him in relationships but it might not follow for everyone.
There's no formula for a good/bad relationship which works in all relationships, so I don't think there is such a thing as getting a relationship wrong either. I agree that perhaps you and your DH grew apart as you grew up rather than the relationship going wrong in some way. I'm always a little bit suspicious when people end up marrying the first person they ever have a relationship with because I wonder how you can know what you like if you're settling down with the first person. I didn't always think this way, though. I do think that breaking up or experiencing different relationship styles in the form of dating is very good for honing your experience of what you do/don't like and what you will/won't put up with (because nobody is ever going to be 100% perfect, but different people find different faults annoying vs tolerable.)
It's interesting that you say the lesson you feel you learned is not to assume. Do you think if you'd known he was unhappy it would have stopped him from being unhappy?