They don't pay billions and billions of dollars, no. They're not paying more than Intel. The costs are split between all of the foundry's customers. So while each of them pays more than Intel pays for its own (for the sake of the argument), because the foundry signs several WSAs, the costs are split between them
Did you bother to ask if fabless is SO good why didn't AMD spun off its factories earlier? Did you ever ask why AMD clung to its factories until it was on the brink of bankruptcy?