Slavery is
illegal in NCR. The local police reinforces laws and detains slavers within the NCR, but the Rangers strike at slavery
outside as an interventionist special force.
That slaver building was built outside NCR's walls, and thus, was not subject to its laws. The police could do nothing about it, but the New California Rangers, being a
legal, moralist branch of the NCR military committed to attack slavery inside and outside NCR, hired the Chosen to do that, as a test for his membership.
When discussing the rangers we must understand that they employ violent methods for civilizational standards, but no different than the CIA of today outside of US jurisdiction. They're a metaphor to the interventionist, moralist vein present in the American government. And let's read again: the government gives the Rangers extra leeway: because the Congress doesn't want to be associated with the Ranger's slightly bad reputation in certain regions, they let them operate instead of the Army or the Police, lessening the association of the violence with the government, and achieving the government goals all the same.
So the Rangers are just a hidden hand of the government pulling strings inside and outside their own jurisdiction. But being they still a legal paramilitary force within NCR, attacking some of them will incur in NCR's wrath, as much as killing a Vault City guard would in VC.