The indications are that at one time mars was both warmer and had an atmosphere thick enough for liquid water to exist. Water devolves many different substances and minerals as well as Oxygen, Carbon Dioxide and Nitrogen. Some of the mineral will themselves slowly combine directly with the dissolved carbon dioxide molecules and form molecules that slow participate out of the water. Not even the Nitrogen is totally inert as slower than the other two will still be slowly reacted with the minerals dissolved in water.
The estimates of the atmosphere being added each year do to volcanic activity and other geological processes is also estimated between tens and hundreds of grams per square meter.
As long as the liquid water remained the process of the atmosphere being bound up into the minerals continued.
In the billion years since volcanic activity stopped is more than sufficient for this process to slowly remove the atmosphere that mars once had. As the atmosphere continued to get thinner and thinner it also lost its ability to retain what heat the sun provided during the day time.