Sharkovskii's theorem does not state that there are stable cycles of those periods, just that there are cycles of those periods. For systems such as the logistic map, the bifurcation diagram shows a range of parameter values for which apparently the only cycle has period 3. In fact, there must be cycles of all periods there, but they are not stable and therefore not visible on the computer-generated picture.