Generally, the sunk cost argument is used to mean "just because you've put a bunch of money in does not mean that your "progress" is worth what you paid for it, and is therefore not a justification to keep putting more money in; you've already lost what is gone so that's off the table."
However, if a company borrowed the money it "sunk", it still has to pay that money back from future sales; if it was raised through equity, continued losses will continue to drag the share price down. Sunk cost is not a free lunch argument.
This is where the "competing for production slots" with passenger variants comes in. The program could only be run cash flow positive at a higher rate of production than the orders were justifying, and that is on the back of the higher priced passenger variants. As it was, Airbus needed to amortize overhead costs over two production lines, the overhead was too much for one production line; worth it in the short term only if you expected sales to pick up in the future. (and you can't shut down a production line and then fire it back up without a lot of extra overhead, so for example, they can't just keep the A380 idea around in case demand develops)
For each piece of the program, there are separate sunk costs. The sunk cost of design does not justify sinking further funds into building an assembly line, if the expected production is not going to pay for itself, even though the design you now paid for is so to speak "free!" And the freighter variant required new sunk costs before it would be ready to sell (the 747-8 itself cost $5B more on top of the already existing 747 platform)
And anything Airbus chose to do, Boeing could disrupt by dropping it's prices/profits; there is a lot of "chess" entailed in marketing these large scale projects. Would have potentially been a different story had there not been competition.