The biggest thing WD40 has going for it isn’t how well the product works but the marketing behind it. It is in no way the best at what it does, but they made sure everyone in America knows WD40 will make stuff stop squeaking. The funny part is since it’s not really a lubricant and has only a smidge of lubricant in it, the squeak will soon be back. So they use more, however a good silicone spray lubricant? That will last forever.
I think it’s a legal thing. If you patent something like a formula, you have rights to it for like 20 years. But if you don’t patent a formula and instead go to extremes to keep it a secret, you can have the rights to it forever. Sure, other people can try to reverse engineering but they still might not get it right.