It is also extremely hypocritical, Apple distributes and profits from existing works of art that depict and describe drug use, among other topics, through Apple TV, iTunes, and Apple Music. Apple has no concerns with profiting from art after someone else approved it whether some other movie producer or record label. As long as some other large institution vouches for it then Apple will look the other way. But if every institution operated like Apple, most of the best works of literature, music, and film would never have been approved.
Honestly, I can not fathom why so much open source and free content is produced for Apple's ecosystem. Everything from the desktop MacOS operating system to Apple's app store policies is counterproductive for developers and anyone who disagrees with Apple's rules. The opportunity of the App store makes sense for commercial and profit driven apps but there is no reason to give charity to the most valued company on the planet.
Finally, I really doubt there is any legal ramification for Apple here. Apple can ban any app they want for any reason which is fine. I just think anyone starting to get into developing should consider anything but app development for this reason. If the product has to be an 'app' then try to make it a web app. Anything besides putting your life in Apple's hands.