Let me start by saying that I think Marquez is an amazing boxer. ATG? I guess it depends on who you ask. No one appears to have a real formula for choosing.
From what I've heard there are a few categories that count.

This guy conned everyone into thinking he's great. Fighting Pacquiao every couple of years with some EZ, tailor-made fights in between does not equal greatness.

Excluding Pac...MAB, Casamayor, Kats, and Diaz are his best official wins. That is not an ATG resume IMO.

Barrera's last hurrah was in '06 when he was going life and death with Rocky Juarez. He didn't do anything relevant after that.

Casamayor previously had received a gift with a bow on top in the Santa Cruz fight. He looked terrible and clearly lost. He also was coming off a yearlong layoff and fighting Corrales 3x, Castillo, Freitas, prime Nate Campbell. His body was DONE.

Diaz, good win, probably JMM's best official win. Diaz was a good fighter but was basically a full time LAW student when they fought. Still a good win.

It pains me to say it but Kats is just a journeyman. He's EZ to hit and comes right at you, tailor-made for JMM. It was a stay busy fight for Pacquiao III.

JMM also has wins over Juarez, Gainer, Peden, and Salido (NOW you can say it's a good win). Mediocre.

This is a good resume, maybe even a HOF, but ATG, LEGEND? GTFO. This con artist owes his entire career and life to one man, Manny Pacquiao. Without him, his legacy is ****. He is not greater than Barrera, Morales, or even Castillo. Not a chance. Those guys fought the best at their best. This guy took EZ fights and followed Pac around like a psycho ex-gf.

Keep in mind, this piss guzzler could have fought Khan, Rios, Matthysse, Bradley, Valero, Guzman, Morales, Hamed, etc. But nope. He settled for sucking Pacquiao's ****. And if he loses next month, I GUARANFUKINTEE he will call for a 5TH fight!