Steampunk is "rootable" in the writings of Jules Verne and H. G. Wells and others. We have scifi visions from Victorian and Edwardian lenses. It wasn't needed at the time to explain how you steam power a submarine or a rocket ship, it was just extrapolating "if this goes on" of quick advances in steam power and expecting them to eventually get there.
Similar with a lot of Diselpunk. The 1930s through the 1950s are often referred to as the Golden Age of scifi. There's so much science fiction written in the real world with a zeal for possible futures that never happened. We don't necessarily need a "massive stretch" to explain why technology took a different path or "got stuck" at a particular point. We've plenty of ideas of the exuberance of that era just in the books that they wrote and published themselves.
(Not that we are lacking in literary means to create excuses for the "realism" of retrofuture, either, when we care to. For one obvious instance, the Fallout franchise's nuclear warfare is central to its dieselpunk setting and an obvious reason for technology to get "stuck". For one less obvious reason, I like "For All Mankind" and its "Apollopunk" setting using the excuse of Russia beating the United States to first boots on the Moon and the butterfly impacts that could have had.)