I don't think there is a meaning, I've always believed it was just meant to be a WTF moment that harkens back to the original film(except in the original film it had been heavily foreshadowed already).
But, for the sake of argument, when Leo left there were 2 spaceships marooned on that planet, the wreck of the Oberon & Leo's own pod at the bottom of the lake. Presumably, the Apes & Humans were intelligent enough to figure out either the basic workings of the pod or to build something based on the wrecked craft. The way that the time anomaly worked in the film makes it possible that even if it took generations for the apes to develop space travel they could still have ended up in Earth's past, changing history.
In a larger sense, the ending evokes the ending of the Planet of the Apes novel, where the hero has an adventure on a planet ruled by apes, and then inexplicably finds Earth ruled by apes upon his return.