This: Because android has a larger general ecosystem, the open source ecosystem is larger, too.
Also, building independent operating systems that reach as many devices as android or android based distros like LineageOS do is next to impossible because of driver issues. In fact, it's only thanks to standardization pushes by Microsoft that you can build a single ISO and run it on different IBM PC's. There is no such standardization push by Google. They are okay with each vendor forking stuff, changing source code, and then providing their own version of Android instead of requiring one google-built binary for all devices. This has detrimental effects on anyone wanting to build an alternative to android because they need to maintain a large number of kernels sometimes with millions of lines of diff to torvalds mainline. There are some meek pushes by Google and other parties to mainline more stuff to Linux and implement ARM GPU drivers in Mesa, but I doubt that we'll get a situation that's equally nice to the IBM PC situation any time soon.
Also, building independent operating systems that reach as many devices as android or android based distros like LineageOS do is next to impossible because of driver issues. In fact, it's only thanks to standardization pushes by Microsoft that you can build a single ISO and run it on different IBM PC's. There is no such standardization push by Google. They are okay with each vendor forking stuff, changing source code, and then providing their own version of Android instead of requiring one google-built binary for all devices. This has detrimental effects on anyone wanting to build an alternative to android because they need to maintain a large number of kernels sometimes with millions of lines of diff to torvalds mainline. There are some meek pushes by Google and other parties to mainline more stuff to Linux and implement ARM GPU drivers in Mesa, but I doubt that we'll get a situation that's equally nice to the IBM PC situation any time soon.