In what way do genes have an idea about what is a better choice and how does that affect their development?
They don't. Remember the slime mold?
And in what way is the mold growth voluntary?
The whole point is that the structure is just the one that happened to work well.
The 'choice' was almost completely driven by the environment, not the mold.
So again, not economical according to your definition.