Because in that time, F14,F15,F18 and F111 variants have been made as well, the total number of which is more than 10k. The testament to the usefullness of these is that they're still being made.
And the thing is each of these 4th gen planes generally carry significantly more weapons externally, than the F35 does internally.
So while I don't dispute that the F35 is individually a great plane, I still don't think the quality X quantity metric of a pure F-35 fleet is higher than a 4th gen fleet.
Which is echoed by US procurement, because if it was, they'd have stopped building other planes, just like the stopped building F-4s not long after 4th gens entered service.