Also a lot of old proprietary game engines were written either specifically for DirectX or additionally for DirectX because in the olden times it was the most advanced and compatible rendering software.
Then, those developers move forward in time to work on other engines and focus primarily on DirectX because it’s still good, compatible, and it’s what they know best. OpenGL languished and it took a while for Vulkan to come out, catch up, and standardize their API.