This is a simple matter of intellectual property. A tool or technique for doing a thing can be patented. A legal monopoly is granted to the originator. The public is made aware of the technique but is legally forbidden from using it for a period of years/decades.
The algorithm cannot be patented, a specific use for it can. Which on cutting edge math may not exist for decades or even hundreds of years.