Not sure if everyone will have access to the 2024 source paper linked by @AlexiG and the authors hypothesis regarding Utsuri and its appearance on Nihonto. So I will post a link here.
While still conjecture on the part of the authors its good to see an hypothesis examined in detail with scientific data and for the paper (I assume) to be peer reviewed before publication.
As to why its present I agree with others here who say that for the most part it was not by accident. Without access to metallurgical testing the early smiths would have known which blades stood up to a beating in battle and those that failed, merely from a visual examination. It wouldn't take many examples to make the connection that a blade with Utsuri was more resilient (which appears to be the case) and for Utsuri to be 'engineered' into the blade to recreate those favourable characteristics of durability as an evolution, over decades and centuries, into the swordmaking process. As to why the appearance of Utsuri diminished going into the Edo period, that could be related to a shift from a focus on durability to one of aesthetics ie jihada and hamon. Far easier to appreciate a beautiful hamon line than ethereal Utsuri clouds.
Utsuri paper.pdf