Adaptive self-organization during growth of bacterial colonies