Dia was a member of the Ultra Beast special ops team, the Ultra Rangers, and is a version of
Ash Ketchum in an alternate universe where Guzzlord destroyed ate everything in its path. He is the only one that remained in this destroyed Alola.
He hasn't captured Zeraora and he doesn't really consider him his partner but they had a mutual desire to send Guzzlord back home and that was the thing that brought them together.
Ash Ketchum could see that
Dia and Zeraora got along well and suggested that the two of them made perfect partners.