Because DirectX is more than a graphics API.
en.m.wikipedia.org/wiki/DirectX
A fair amount of what used to make DirectX an everything API has been deprecated, but if you are already using Windows stuff for networking and audio, then you may as well use the graphics APIs too.