Katakana and hiragana were created by historically different processes. They continue to survive because they are useful. That’s all there is to it, really, although you can get into a lot more detail. I don’t have time to explain it all, but no doubt someone else will.
If it involved children's books, this is one of the rare instances that hiragana is used in place of katakana. Because of its purpose however, katakana's role remains. Just like it was historically used. Hiragana became a common script nowadays, originally conceived for women, and it's women who also shaped some of the grammar with Japanese. Not katakana. It's the fact that hiragana isn't the script that katakana is used for is why hiragana wouldn't likely replace katakana at any time soon, and it's really all the better for it, honestly.