I have no insights into internals of Nvidia, but it really doesn’t make sense to me how there is literally no alternatives that are even close to its maturity. I remember in the early days OpenMP and PPL being contenders early on, but I never heard about them after and only CUDA kept going. I was working on a graduate project in 2009 and I remember us looking into OpenMP and CUDA and going with CUDA because we found it easier to use. But also along with CUDA, only Nvidia pushed the whole GPGPU idea and AMD (and Microsoft to some extent) only paid lip service to the concept without any actual commitment like Nvidia did for a long time.
apple has a lot to do with it. Apple drove the early days of opencl, and pulled out some time in ~2012. Ian made a decision to cut opencl support at Nvidia at some point in time after that. Had apple actually made a proper GPU compute language standard after walking from opencl, it might not have been such a empty landscape. But alas, apple wasn't in the HPC business, which was the only place that actually made money from GPGPU.
I can't speak to why AMD is so massively incompetent or why they weren't a factor in driving a competitor.
A factor that might not be obvious is that in 2012 CUDA was mostly a commercial failure. Aside from some penetration into oil and gas HPC and things like physics acceleration in games, there wasn't much traction.