In the aerospace business there is a guy known as the Mass Properties Engineer who gets to rule the project with an iron fist. He is responsible for knowing the estimated, calculated or measured weight of every part on the spacecraft from concept through to launch. It's not a very fun job, but it's very important. Some people actually made careers out of it. You simply cannot get this stuff wrong and not pay dearly for it later. There are reviews, arguments, dealings, and handwringing over all of this.
Now, I have no idea if the Spanish sub business runs anything like that, but it surprises me that it apparently doesn't or didn't in this case. It's not like you just let some engineer in the corner calculate the weight and then go build it. This is a systemic fuckup, not a shifted decimal point.