Ive often wondered why the Great Wall of China isn’t counted amongst them? Is it not ancient enough? Or not wonderful enough? Was this list of ancient wonders made in modern times or ancient times?
The idea of a canon of seven was dreamed up in antiquity by people who spoke Greek. This was of course before the modern wall was built, and China was a bit too far away for them to be familiar with the Qin-era walls.
The oldest known version of a list of seven wonders is partly lost: it's in Berlin papyrus 13044, the Laterculi Alexandrini (late 100s BCE), in verso column 8. The preserved part of the text includes the temple of Artemis, the pyramids, and the tomb of Mausollus. The oldest complete list is in a short poem by a Lebanese poet, Antipater of Sidon (mid-00s BCE), in Palatine anthology 9.58. Antipater's version has two wonders in Iraq (the wall of Babylon and the hanging gardens), one in the Aegean Sea (the Colossus of Rhodes), one in Egypt (the pyramids), and two in Anatolia (the tomb of Mausollus and the temple of Artemis).
Inspiration came from a Greek habit of making lots of lists of seven things. The first such list was a canon of 'seven sages', which appears at least as early as Plato (early 300s BCE). A 1st century CE mythographic work misattributed to Hyginus, the Fabulae, has lists of seven sages, seven lyric poets, and seven wonders; the Laterculi Alexandrini also has lists of 'seven famous men' and the 'seven greatest islands'. Seven is a typical number. Not a symbolic number, mind: there isn’t a specific thing that it symbolises. Just typical.
(Incidental note: modern lists of the 'seven wonders' typically include the lighthouse of Alexandria, but it didn't appear on any ancient lists. It only began to be included in lists dating from the 500s CE and later.)
(Another incidental note: if you like the seven wonders, you'll get to see two of the less-depicted ones on the big screen later this year in Marvel's Eternals. The trailer includes a shot of Babylon with the great wall and the hanging gardens visible. Also some mountains, strangely, given that Babylon is in completely flat terrain: supposedly that was the whole point of the hanging gardens, according to Greek writers, to resemble a mountain in a completely flat environment. There have been doubts in recent years over whether anything of the kind actually existed in Babylon, but that's another story.)
It's worth noting that the 'Great Wall' was largely a European invention of the Early Modern period. See these past answers for a bit of further information:
And to expand on a point by /u/KiwiHellenist, it is important not to confuse the frontier defence earthworks of the Qin to Sui periods with the large masonry structures established under the Ming. The majority of the surviving physical structure, which massively determines how we conceptualise it in popular culture, is from the sixteenth century AD.