The source code isn't hiding in a repo somewhere for security reasons — it's spread around on various pieces of paper and computers over the last 50 years. There isn't a single source of truth. Adds a whole other level of wizardry to keeping the thing running.
It costs money that would better be sent towards other projects, and NASA needs to be as careful as possible with spending their very limited budget.
Having a ton of people run around the office for a couple months to collate a bunch of documents so you can better pass info on to a new generation of workers when the satellite might not even be usable anymore isn't very efficient. Might as well just pay an extra 50% or whatever to the 5 dudes who know what's going on until the thing is inop. Even if it died today, the mission still would've been a massive success.
The source code isn't hiding in a repo somewhere for security reasons — it's spread around on various pieces of paper and computers over the last 50 years. There isn't a single source of truth. Adds a whole other level of wizardry to keeping the thing running.