CD Projekt Red spent $125 million on Cyberpunk 2077 post-launch, repairing the game's reputation with the Edgerunners and Update 2.0 patches alongside Phantom Liberty expansion.
headline number is only the equivalent of ~200-300 tech employee salaries for 3 years, less for junior, more for senior, less for designers, marketers, more for Directors, VPs, Execs...
Marketing isn't cheap either. Can't rely on word of mouth when that word is "shite". Fixing the code would have been relatively cheap compared to fixing their reputation.
Why do you think it didn't go into devs? Maybe you are being cynical, but managers and CEOs are definitely devs too, they need their extra motivation to convince themselves the game is gooder.