Is there any reason to prefer Direct3D over OpenGL? So I was reading this, I sort of got the reason why there are a lot more games on Microsoft windows than on any other OS. The main issue presented was that Direct3D is preferred over OpenGL. 

What I don't understand is why would any developer sacrifice compatibility? That is simply a financial loss to the company. I understand that OpenGL is kind of a mess, but that should hardly be a issue for experts. Even if it is, I think that people would go a extra mile than to incur a financial loss. 

Also if I'm not wrong then many cross platform applications use both Direct3D and OpenGL. I think they switch between the APIs.     

This is weird as they can just use OpenGL, why even care about Direct3D? 

So the question is, are there any technical issues with OpenGL or is there any support that Direct3D provides that OpenGL lacks?



I am aware that this question might be closed as being off-topic or too broad, I tried my best to narrow it down.
About the fact that there are more games for Windows, some reasons are


Windows has the majority of the market and in the past to develop cross platform games was more complicated than it is today.
DirectX comes with way better tools for developing (e.g. debugging)
Big innovations are generally first created/implemented in DirectX, and then ported to/implemented in OpenGL. 
As for Windows vs Linux, you have to consider that when there is an actual standard due to marketing and historical reasons (for that see Why do game developers prefer Windows? | Software Engineering, as I said in the comments), it has its inertia.


The inertia thing is very important. If your team develop for DirectX, targeting 90% of the market (well... if you play games on pc you probaly have windows, so... 99% of the market?), why would you want to invest in OpenGL? If you already develop in OpenGL, again targeting 99% of the market, you will stick to it as long as you can. For exampe Id Tech by Id Software is an excellent game engine (powering the DOOM series) that uses OpenGL.

About the topic of your discussion, a comment.

As of today, there are many many APIs, and a common practice is to use a Game Engine that abstracts over them. For example, consider that


On most mobile platform you have to use OpenGl ES.
On PC you can use both DirectX and OpenGL
I think on XBOX you have to use DirectX.
I think that on PS you use their own API. 
With old hardware you use DirectX9 or OpenGL 3, or OpenGL ES 2.
With more recent hardware you can (and want to) use DirectX 11, OpenGL 4, OpenGL ES 3.


Recently, with the advent of the new low overhead APIs - whch is a major turning point for graphical programming - there are DirectX 12 for Windows and XBOX, Metal for iOS and Vulkan (the new OpenGL) for Windows and Linux (including Android and Tizen).

There still are games that only target Windows and XBOX, but IMHO today that can only be marketing choice.