The first A-series chip they officially released and named was the A4 in March 2010. That is 11 years ago. That is the beginning of M1. And the reason is originally in this amazing Ars Technica article [1]. Apple has always wanted to fully control the entire stack.
Any competitors in the same space lack either the vision, or the products, or the money to do the same thing. In the case of Microsoft and Google, their internal politics don't allow them to do the same thing (Google couldn't care less about hardware because the Web is where Google's money at; MS cares about hardware but traditionally they have relied on throwing money at partners to make them come up with solutions).
[1] Owning the stack: The legal war to control the smartphone platform, https://arstechnica.com/tech-policy/2011/09/owning-the-stack...