As habitats shrink or disappear altogether due to urban sprawl or agriculture expansion projects, fewer places remain for bees to make nests safely away from predators or environmental hazards like pesticides whose toxicity can weaken colonies within just hours after contact with poisoned flowers nearby .