I have seen the same thing happen in multiple domains. You may have identified a problem to solve, but the act of solving it, by writing it down, by writing a program, building a tool, making a device, or even carving from stone.
As you work on it the problem becomes more clear and seems to tell you what the actual shape of the problem is and you have to adapt your solution to that actual problem, even if it ignores certain aspects of the original idea.
Writing it down and trying to clarify it is one of the cheapest ways to get to the real answer.
[flagged]