It is a concept that has been around for many, many years.
Actually, for so long that the first time that it was so stated is lost in antiquity.
There are several reasons why some people actually believe it to be true, such as the fabled elephant 'graveyard' where all elephants still capable of movement are said to 'stagger' to as a place to die, the poor creatures remembered their way to the graveyard.
And, elephants have often been mishandled in circuses and even zoos, where they can turn from being very docile to very angry, very quickly - - they turn on their tormentors, who say that that elephant didn't forget - - etc
Basically what I'm saying is, once a 'belief' becomes founded, it lives on in people's minds to become supposedly established fact.
The concept of Elephants having exceptional memory also has many believers because earlytime African explorers occassionally came across locations where there were collections of many elephant's bones; hence, an elephant 'graveyard.'
Elephants need a lot of forage to survive.
In times of great draughts elephants died in large numbers leaving fields of bones, the elephants supposedly remembered their way to their 'graveyard' even though it just happened to be close to the dry waterhole where the elephants had congregated until they died of thirst..... etc