There could potentially be millions and billions of forks. But only a very very very small number of those forks will actually be relevant. Most of them? We won't even hear about.
Think of it like an image on the world wide web. Everyone can alter, download, and print that image as much as they want. Why? Because it's freely available on the web for everyone to access. Same thing with Bitcoin. The source code is open and public on the web; and you can copy it yourself, alter it, and run it.
Here's Bitcoin Core's source code just so if you're interested:
https://github.com/bitcoin/bitcoin