The general case is developing software on a desktop OS in containers that are intended to be deployed on Linux boxes. Since the whole point of containers is that the container runs against the host OS kernel directly, clearly that is not really possible on a desktop that isn't running Linux as there isn't a Linux kernel there to run against. there are two ways past this. Emulate a Linux kernel, or run a real linux kernel in virtualisation for the container to run against
WSL 1 chose the first approach so the container thought it was running against a Linux kernel but it was actually a windows kernel plus a syscall shim. That's all fine and dandy in theory, but not running against real Linux means there was always the risk of different behaviour on Windows versus on the Linux deployment host. In WSL 2 Microsoft switched to running a real linux kernel in a hypervisor, which is basically the same approach as on the Mac.
WSL 1 chose the first approach so the container thought it was running against a Linux kernel but it was actually a windows kernel plus a syscall shim. That's all fine and dandy in theory, but not running against real Linux means there was always the risk of different behaviour on Windows versus on the Linux deployment host. In WSL 2 Microsoft switched to running a real linux kernel in a hypervisor, which is basically the same approach as on the Mac.