You have kids together and share custody. You need to be on friendly terms for the sake of your children. Yeah, okay, that makes sense.
Maybe you dated short two weeks, but before that you were friends for six years. Or maybe you dated six months, but you're both actually immortal so in your timeframe who cares. Fine, be friends.
Your will-they-won't-they again drama keeps the show movin'! Also if you move across the hall from each other after a couple of kooky misunderstandings, that'd be totally understandable and downright hilarious!
You owe them your life ... but mostly you're waiting around for them to kick the bucket and get that second lung. Unlike your love, blood type compatibility is for life.
Okay, so it's not so much that you're friends with your ex as much as you go back in time and hang out with your ex while you two were still dating. Honestly, with your kind of power I really believe you can find someone better than an interactive ghost of the past, but, hey, you do you ...over and over again.
According to extremely scientific anecdotal evidence of everyone I have ever known, this is the leading cause of all exes remaining in contact.
You two are TWO MATURE ADULTS who are appreciate each other as humans regardless of whether or not you are sleeping together. Enough time has passed since you broke up, and now you both in new healthy loving relationships, but you still want to hang out with each other...
... lol ....
...whatever helps you sleep at night.