It's self evident that Horizon wasn't tested properly, otherwise the whole issue wouldn't have happened. More likely it was time pressure rather than cost pressure to release it before it was robust.
It's possible that Horizon was so big and complex that nobody was able to determine whether it worked properly or not, at least until real world operation showed it was buggy. At least some of the system managers might have been correct in saying their bit worked correctly. Clearly not all of them.
What's hard to understand is why the Post Office, and then Fujitsu didn't see the pattern of sub postmasters racking up losses and do something about it. Continuing to prosecute people when there were system issues is a bizarre decision. Every day that passed increased the reputational damage to the Post Office and Fujitsu exponentially.
Why hasn't the Post Office given all the known people affected an interim payment pending the result of the enquiry? At least that would have saved a bit of PR face for the Post Office. Right now the PO looks like a monster.