It is not a maxim, "those who don’t learn history are doomed to repeat it," but an ignorant paraphrase of George Santayana. It is ignorant of the fact that history is written by the victors (after Nehru, 1946 The Discovery of India).
George Santayana, 1905 Life of Reason, Reason in Common Sense, "Progress, far from consisting in change, depends on retentiveness. When change is absolute there remains no being to improve and no direction is set for possible improvement: and when experience is not retained, as among savages, infancy is perpetual. Those who cannot remember the past are condemned to repeat it." http://www.gutenberg.org/author/George+Santayana