I've found this interesting as well.
It's not really clear that "formal" mathematics is actually that useful to an ancient society, even ones like Egypt or Greece that embarked on large engineering projects (you don't really need a proof of most basic geometry, just empirically noting relationships between shapes will get you far enough). So the idea that it started as basically a religious activity amongst mystery cults in Egypt and Greece is appealing
Of course, the fact that the "mystery" part of "mystery religions" means they didn't write anything down, so rather frustratingly we only get vague third hand accounts of this stuff from classical greek philosophers and Roman-era neo-platonists.