Answer: why
Step-by-step explanation:
A writ of habeas corpus is used to bring a prisoner or other detainee e.g. institutionalized mental patient before the court to determine if the person's imprisonment or detention is lawful. A habeas petition proceeds as a civil action against the State agent usually a warden who holds the defendant in custody.