Sometimes NASA will cancel something for budget reasons that they know will cause an outcry, or threaten to cancel it.
Even when they have other options to save the money required to not cancel that thing.
They know if they cancel something important the outcry will likely trigger a boost in funding just to save that thing.
It's all politics and methods to get as much funding as they can.
It can of course backfire though.
In this case though, it looks like it was all contract based, it went too far over budget and triggered a cancellation.