CUDA took off for that reason, early mover advantage.
CUDA stayed relevant because they stood behind it and supported it for 20 years rather than changing to a new framework every few years and only half-heartedly supporting, and because it worked on consumer cards so anyone could learn how to use it.