Bail (cash, secured, unsecured) and conditions of release should be as least restrictive as possible to reasonably ensure that defendant appears for trial, does not reoffend, yet protect the public.
The more serious and violent the offense, the more risk factors that suggest a defendant ought not be released, favors cash or secured bail.
Some jurisdictions (including the federal system), permit courts to detain defendant without bail.