The magistrate judge should not have approved the warrant. They should have had a bail hearing within 24 hours, at which it would have been clear that they posed no threat.
Instead somehow bail was set at $2 million and the hearing to reduce bail was delayed.
Those are flaws in the system that should be fixed, and will continue harming people even without bad faith from sheriffs.