The prime minister has bowed to pressure, announcing a federal inquiry into the Bondi Beach terror attack.