One of my exes is an extremely dear friend of mine, still, after 10+ years. I think it's because when we were dating, we had a rather strange relationship....we knew there was no way in hell we'd ever get married and were very pragmatic about the whole thing. There would have been no point to NOT staying friends, for us.
He's basically like one of my girlfriends, with different equipment.

The thing I love the best about our relationship now is I can tell him ANYTHING about my life and not worry what he'll think, and vice versa.