When the TF2 code was leaked, it resulted in new vectors of attack on the servers being found and the development of bots that are still ruining the game.
Cathook (the main botting tool) has been in existence since at least Oct 2016, which is a year older than the code in the source leak.
Yea, that existed, but it got even worse after the code was released. There are many examples of issues that most likely resulted from the leak.
Imagine if you could simply deploy an army of fuzzers on a piece of code, vs what could be derived from client side probing. Yes, having access to the source is a problem.
Which wouldn't have been an issue for too long if Valve was still maintaining TF2. For a game still being maintained and developed like LoL, a new vector of attack would probably only last for a few days before it is patched or mitigated.
It's a bit different because TF2 is basically abandonware.
When there are adversaries with the time, knowledge, and sometimes money to dismantle you, it absolutely is crucial to obfuscate
The key to League of Legends success isn't related to the code at all
but its success can be undermined by hackers, etc....
Obfuscation is a great way to keep exploitable bugs in your code forever.
There is no better teacher than a great adversary. Unfortunately, business concerns trump perfect code