Docker Engine (the "CLI") only works on Linux. "Desktop" is supposed to offer a unified experience across platforms, it offers a GUI, ships Docker Engine inside a virtual machine so that it works on Windows and MacOS, and tries to make the VM as transparent/invisible as possible (with varying success) with filesystem mounts and network configuration.
Docker Engine (the "CLI") only works on Linux. "Desktop" is supposed to offer a unified experience across platforms, it offers a GUI, ships Docker Engine inside a virtual machine so that it works on Windows and MacOS, and tries to make the VM as transparent/invisible as possible (with varying success) with filesystem mounts and network configuration.