Why does it need to have goals at all?

Towards the very beginning, I claimed that eventually we will make an AI that can code and successfully steer the future toward a given goal. While AIs that are not this capable are still useful, AIs that can do both of those things are enormously more valuable, because many tasks are only accomplished by agents that can plan in the pursuit of a goal. So eventually, for the reasons already discussed, we will create an AI not only with goals but with functional and effective decision algorithms to achieve them, because of how tremendously valuable they would be.

What sorts of tasks would require an AI to make decisions effectively in accordance with a goal? Writing efficient code that has a complex desired functionality. Coming up with better algorithms and data collection strategies for identifying underpriced real-estate. Coming up with better algorithms for identifying the best way for a chatbot to respond to an unhappy customer. Seeking maximally useful data to help answer a question or make a prediction. Obviously, the list is unending. What ties them all together is a mind-bogglingly enormous range of possible solutions. Now think about how lucrative an algorithm would be if it could do all of these tasks. Some day, it will get made.