I have a good feeling that the Dark/Light themed wallpapers work similarly to how Dark/Light themed images work with WebKit.
As of macOS Mojave, website developers can make their webpages change based on the system theme (light or dark). Websites that support dark mode will have at least 2 images, a dark-themed image and a light-themed image. When a user changes their theme from light to dark (or vise versa), the webpage will transition from one image to the other accordingly.
For their light/dark wallpapers, Apple may have created two similar images and given them the exclusive ability to transition when the Dark Mode setting changes; but I cannot be 100% certain. If this is the case, they probably just use a standard image file format but made it so only they can make transitioning wallpapers.