I couldn't say for certain, but as they obviously DID have a headstone then someone would have had to pay for it - paupers usually were in unmarked graves.
maybe they were all part of an extended family?
The burial register if it still exist (see Scotlands People?) may have more information on them