Mars does have an atmosphere, but it's thin. As for holding onto the air, it all depends on what kind of timeframe you're talking about. The Moon, for example, has no atmosphere because it's too small. But if you magicked into an existence an Earth-like atmosphere on the Moon, it would persist for something like a million years before it all drifted away. Mars would do even better. That kind of timescale is probably plenty for human purposes.