Oscillator networks rapidly become one of the promising vehicles for energy-efficient computing due to their intrinsic parallelism of execution. The criticality property of the oscillator-based networks is regarded to be essential for performing complex tasks. There are numerous bio-inspired synaptic and structural plasticity mechanisms available, especially for spiking neural networks, which can drive the network towards the criticality. However, there is no solid connection between these self-adaption mechanisms and the task performance, and it is not clear how and why particular self-adaptation mechanisms contribute to the solution of the task, although their relation to criticality is understood. Here we propose an evolutionary approach for the structural plasticity that relies solely on the task performance and does not contain any task-independent adaptation mechanisms, which usually contribute towards the criticality of the network. As a driver for the structural plasticity, we use a direct binary search guided by the performance of the classification task that can be interpreted as an interaction of the network with the environment. Remarkably, such interaction with the environment brings the network to criticality, although this property was not a part of the objectives of the employed structural plasticity mechanism. This observation confirms a duality of criticality and task performance, and legitimizes internal activity-dependent plasticity mechanisms from the viewpoint of evolution as mechanisms contributing to the task performance, but following the dual route. Finally, we analyze the trained network against task-independent information-theoretic measures and identify the interconnection graph’s entropy to be an essential ingredient for the classification task performance and network’s criticality