I suspect Minecraft was large enough to support an effective modding community from the start regardless of official support, so that there was always some kind of third-party unofficial mechanism (ModLoader, then Forge, then now Fabric and Quilt). Mojang probably punted it down the priority list because of that, or didn't want to impose a structure and kill those ecosystems. Technically speaking, Java is reasonably easy to plug stuff into at runtime, so that was never a barrier.
The original issue with official modding support, from my perspective, has always been a legal one. But the Mojang EULA explicitly allows modding now. So I would see this decision as one in a long line of decisions by Mojang to both normalise the legal relationship with modders, and beyond that giving a "thumbs up" to the community.