Maybe some luck. But there’s also a principle that if you optimize the hell out of something and follow customer demand, there’s money to be made.
Nvidia did a great job of avoiding the “oh we’re not in that market” trap that sunk Intel (phones, GPUs, efficient CPUs). Where Intel was too big and profitable to cultivate adjacent markets, Nvidia did everything they could to serve them and increase demand.