The CDX basically lists all the pages of the site that are archived in the wayback, as well as when each page was archived (e.g: "page x was archived 3 times, on these dates"). Using the CDX allows the tool to download a specific copy of the site (e.g: the latest) rather than trying to download every copy of the site that the wayback machine has.
This is important because for most sites, the wayback has multiple copies, and they're all interlinking. For example, the copy from May 2020 might not be complete so one of the links in that copy will take you to the January 2018 copy. Not a problem for a human viewer, but a bot / crawler will see pages in the January 2018 copy as separate from those in the May 2020 copy, so will begin downloading the January 2018 copy (because wayback URLs are of the form web.archive.org/<timestamp>/<archive-url> rather than web.archive.org/<archive-url>/<timestamp>). This copy will (inevitably) lead to other copies made at different dates, and before you know it you're downloading hundreds or even thousands of copies of the same site.
[source: tried to download a site from the wayback machine several years ago using wget - it didn't end well!]