It’s actually pretty standard. They work on the software all the way through the flight to Mars. There’s no reason to have the software all done before launch, that just loses months of dev time. Most of these things don’t get the mission software until it’s needed, landing sequence gets transmitted as it’s getting there, rover movement software won’t get loaded until after it lands. And then there’s always tweaks. Anything they look at and think “that could do better” they work it.
The launch window to Mars is a pretty firm date. Your software development can be more flexible to ease the strain on the mission planners.