The primary reason Congress and individual states passed preventative detention laws is:
c) To safeguard the public
Preventative detention laws are designed to detain individuals who are deemed a threat to public safety or a flight risk before their trial. This measure is taken to protect the community while legal proceedings are underway.