The Atraxi didn't have the memories of all the past Doctor's incarnations after scannning him. The Doctor himself said they were monitoring the whole planet, including its own history. If you remember, they showed images of past historic events, like World War II, and in the Whoniverse, The Doctor has been a vital part of Earth's history:
ATRAXI: Is this world important?
DOCTOR: Important? What's that mean, important? Six billion people live here. Is that important? Here's a better question. Is this world a threat to the Atraxi? Well, come on. You're monitoring the whole planet. Is this world a threat?
(There is a projection of the world between them.)
As for why he called them to come back, it was also explained in the episode. The Doctor not only wanted them to go away, but also to never come back:
RORY: You just summoned aliens back to Earth. Actual aliens, deadly aliens, aliens of death.
AMY: So this was a good idea, was it? They were leaving.
DOCTOR: Leaving is good. Never coming back is better. Come on, then! The Doctor will see you now.
In their search for prisioner zero, the Atraxi scanned the whole Earth and its history to determine if humankind was a threat for them. It clearly wasn't, so they didn't care to burn the whole planet down in order to catch their prisioner. After delivering Prioner Zero to them, The Doctor made sure to let them know this world was under his protection, very similar to a quote used by the Tenth Doctor (David Tennant) also in his very first episode:
From The Christmas Invasion
TENTH DOCTOR: By the ancient rites of combat, I forbid you to scavenge here for the rest of time. And when go you back to the stars and tell others of this planet, when you tell them of it's riches, it's people, it's potential. When you talk of the Earth, then make sure that you tell them this. It is defended.
It's just something The Doctor does to make sure aliens don't mess with Earth. Like he said, he has put a lot of work on it.