We theoretically explain the complete sequence of shapes of deflated spherical shells. Decreasing the volume, the shell remains spherical initially, then undergoes the classical buckling instability, where an axisymmetric dimple appears, and, finally, loses its axisymmetry by wrinkles developing in the vicinity of the dimple edge in a secondary buckling transition. We describe the first axisymmetric buckling transition by numerical integration of the complete set of shape equations and an approximate analytic model due to Pogorelov. In the buckled shape, both approaches exhibit a locally compressive hoop stress in a region where experiments and simulations show the development of polygonal wrinkles, along the dimple edge. In a simplified model based on the stability equations of shallow shells, a critical value for the compressive hoop stress is derived, for which the compressed circumferential fibres will buckle out of their circular shape in order to release the compression. By applying this wrinkling criterion to the solutions of the axisymmetric models, we can calculate the critical volume for the secondary buckling transition. Using the Pogorelov approach, we also obtain an analytical expression for the critical volume at the secondary buckling transition: The critical volume difference scales linearly with the bending stiffness, whereas the critical volume reduction at the classical axisymmetric buckling transition scales with the square root of the bending stiffness. These results are confirmed by another stability analysis in the framework of Donnel, Mushtari and Vlasov (DMV) shell theory, and by numerical simulations available in the literature.