Entrance pupil size and front element diameter are extremely well correlated for longer focal lengths, but as you get into ultrawides the correspondence stops. Our 8mm f/4.0 lens should have a tiny front element. The answer is that for a lens to be f/4.0 the physical hole in the lens, that appears to be 2mm wide, must be visible from across the whole field of view, which is considerable,considerable; hence a large bulbous front element.
Due to the smaller sensor the iPhone lens has a much smaller field of view compared to it'sits focal length, hence the range of angles the physical aperture has to be visible from is much reduced, allowing the front element, and (and thus the size of the lens as a whole) to be much smaller than that of the APS-C lens.