Ozone protects life on earth from the sun’s ultraviolet (UV) radiation. It is unstable and is formed by chemical reactions between oxygen with UV light (sun radiation).
Since it is unstable it can decay fairly quickly. This means that it can only appears when the reaction forming it keeps happening. This is true in the upper atmosphere which is why we have an ozone layer.
some hydrocarbons (not just from pollution from cars but also from volatile stuff released by trees) can react to generate ozone at ground level. But we only see a significant concentration when the reaction forming it is happening.
The effect of gravity on the separation of the components of the atmosphere is small, especially in the lower atmosphere where diffusion and turbulent circulation mix things up thoroughly. In the upper atmosphere, the dominant process is diffusion and not gravity.
Ozone is thermodynamically unstable and decomposes into molecular oxygen. Thus, a dynamic equilibrium exists between the production and decomposition of ozone.
O2(g)UV→O(g)+O(g)
O(g)+O2(g)UV→O3(g)