One explanation that New York Historical Society provides is that it is popularized by John Fitzgerald, who used the term in a column of horse racing in New York Morning Telegraph in the year 1921. They go further back with the explanation of the word that the same columnist used it in his column on February 18, 1924.
The concept was to project the city as a dream of every one. The Big Apple is the dream of every horse rider who has ever been on a horse. And this way they projected the city as a dream destination.