It's probably there because the word is derived from maes, to mark the elided vowel.
The Gweiadur dictionary gives three spellings: maes ma’s mas (so both with and without apostrophe. The GPC dictionary, on the other hand, has an entry mas (only without apostrophe) that points to maes, though the historical citations use a variety of spellings (maes mâs ’ma’s mas).
They mean the same thing -- depending on where you live, you would usually use one or the other. Kind of like "pavement/sidewalk" or "torch/flashlight" or "tap/faucet" in English.
ma's is "more south" and allan is "more north", in case you want to pick your preferred word based on that.