The F-35 (more specifically, the JSF program out of which the F-35 was the successful contender) was conceived as a comparatively cheap multiservice, multirole fighter to reduce both initial development and ongoing operational costs by having a high degree of commonality between the conventional air force model, the CATOBAR navy model, and the STOVL marine corps model; It was also supposed to replace basically every US fighter and strike aircraft except for the F-15 and variants, which the F-22 would replace, and the F-22 itself.
As it turned out “do everything" and “be cheap” turned out to be less compatible goals than originally envisioned.