That's not what we're learning. We're learning
how not to make those mistakes. That yields: 1) Lower risk launches in the future through better process and better design 2) Possibly cheaper/better hardware redesigned due to the issues uncovered today.
Yes, it is probably lower ROI than that payload getting into space, but it does mean it's not a total loss and not simply a broken window fallacy.
It's more akin to if the window maker also tried to learn/test harder to break windows with each one she installed. Then, each broken window would be an experimental outcome instead of just a lost window.