It's not always easy to stay friends after a break up. Not close friends, at least. The friendship is forever changed, and might not be as good or deep as it once was. It can be worth the risk, though, if you like each other. If it does work, it can make your bond even stronger.
Why is this pact necessary? That's the definition of friendship. My best friend lives across the country and I see her maybe once a year, and we text maybe once every two weeks, if even. But we're friends. When I don't see my friends it's only because life comes up, but everyone understands and it doesn't undermine our friendship in any way.