True, but Apple has a huge developer fan base whereas Microsoft didn't until very recently, and that's only due to their massive course correction with WSL, VSCode, among others.
Microsoft, the largest software company with the most-used OS by businesses, most popular pc gaming platform and Xbox, maker of visual studio - The standard dev tool on windows, the biggest java competitor, one of the big SQL engines, one of the big web servers, has had a huge developer fan base since long before Ballmer’s famous “developers” presentation.
Much much bigger than Apple by having much much more marketshare of everything except smartphones.