Welcome to the real world (Software edition)
In college, when a software task was assigned, there was a lot of focus on preparing for everything from the beginning and to optimize everything. This was based on the fact that every task was perfectly defined, its requirements clearly stated and that was not going to change in the process.
This approach works in college, but I´m still waiting for that to happen in the Real World. The truth is, developing a software is not about reaching point B from point A, but is the process of going from A to B. Software changes and it´s always evolving and probably is never finished. In my working career I never saw a successful project that followed that fixed mindset.
The sad part is that some people still wait for that unicorn and then get frustrated when the project fails or changes, or get mad at the client for not knowing all the requirements from the beginning.
Developing software is a discovery process that you and the client will follow and both need to know that. I learned this when I started building my personal projects. I wrote all the requirements, mock up all the UIs, wrote all user stories, but when I started the project and saw it in action, a lot of new information came in. Because of this, I changed a lot of things and little of what I did in the beginning was useful.
Agile methodologies try to manage this problem, but nothing is going to get solved until we and our team change the mindset, the approach and the expectations when building software.