The simple story is that Maas traveled around Ferelden looking for rumors of Grey Warden activity. Whenever he heard that a Warden had been sighted somewhere, he went there to try and track down the Wardens. When he finally caught up to them, he was surprised to discover that they were reduced to such an extremely low number. He volunteered his services, and he's been travelling with the group since.