Yes, because it's based on a PC. A quite standard and open specification where you can buy motherboards, CPU, RAM, disk, IO peripherals etc from many different manufacturers and build and install what software you want. However, on a Mac, you cannot install or change the hardware as you like, you cannot install what software you want.
If Linus Torvalds was a teen today and there was no open PC standard, only a Mac, then it would not have been possible to create Linux the way it is today.
Imagine if also Microsoft starts to make their own processors and then sell their own computers with Windows and all locked down, and don't allow anyone else to make computers with Windows or their processors.
Sure Dell, HP and others could still make PC's, based on Intel or AMD CPU's or some ARM processor and then run Linux (or develop their own OS), but it's a hard sell.
The PC's sold to the mainstream thanks to Windows/Word/Excel maybe, but then people who wanted could tinker as much as they wanted and where free so make and sell their software (windows based or whatever) or their HW peripherals.
Now you are at best stuck within an app store if you create something.