Our current understanding of networks structure and evolution is largely based on the description of the dynamical processes that have shaped them. Alternative approaches based on principles of optimality have been proposed, but are certainly not mainstream. Although there are good reasons for that, I will discuss examples where such approaches are fruitful, focusing especially on the case of road networks.