Its easy to look at things in hindsight, but at the time it was the right decision (and it may yet turn out to be the right decision). Go back to mid Sept 2021 - Franklin was definitely one of the "hot, brand" names in the coaching community, despite what happened in 2020 with the covid team. More importantly, he was probably in the top 4 or 5 guys that could conceivably leave their current school for a better deal at another P5 school. Let's be real - Saban, Day, Swinney, and Smart aren't/weren't leaving their schools to jump to another P5 program.
So, Franklin fell into that next tier of "good" coaches who would possibly consider leaving their school for what might be perceived as a better opportunity to win a national title elsewhere. I said at the time and I still believe it, that the USC job is a (much) easier path to the playoff and national championship than PSU. That was the only opening that I thought Franklin might take. I truly believe that if CJF went to USC, he would finish in the top 5 of recruiting results annually and eventually turn that into on the field success.
Somebody with the purse strings at PSU decided that PSU was better with CJF than without him. I happen to agree, but understand rational people can have differing opinions. So, they decided to lock him up.
You may not like the terms of the contract, but it simply comes down to one simple fact - that's the going market rate (length and amount of $$) to lock up a top 10 coach.