Diverse biological networks exhibit universal features distinguished from those of random networks, calling much attention to their origins and implications. Here we propose a minimal evolution model of Boolean regulatory networks, which evolve by selectively rewiring links towards enhancing adaptability to a changing environment and stability against dynamical perturbations. We find that sparse and heterogeneous connectivity patterns emerge, which show qualitative agreement with real transcriptional regulatory networks and metabolic networks. The characteristic scaling behavior of stability reflects the balance between robustness and flexibility. The scaling of fluctuation in the perturbation spread shows a dynamic crossover, which is analyzed by investigating separately the stochasticity of internal dynamics and the network structure differences depending on the evolution pathways. Our study delineates how the ambivalent pressure of evolution shapes biological networks, which can be helpful for studying general complex systems interacting with environments.