A property of mass is the distortion of space. Mass-free theoretical straight line paths in space are in fact altered to curved pathways by the presence of any mass, as evidenced by observation. A local observer (orbiting body) notes no applied acceleration affecting the course of the body. Warped space around a massive body allows another body to move without external imposed accelerations, yet follow a closed path.
Curvature of space is greater for a given mass, as distance to a mass is diminished. Static gravity is an effect of differential curvature of space, as a function of distance from the center of a mass. More mass= more space curvature= more observed gravity.
The lack of a magnetosphere, for lack of a strong magnetic field, allows the plasma from the solar wind to interact with the Mars atmosphere. Energy added sufficient to achieve orbital escape velocity of high altitude atoms or molecules from the Martian atmosphere, is the primary driver of depletion.
That’s what I said :)