The writ of Habeas Corpus is
To safeguard people from illegal arrest
The Petitioner who requires legal help to get his work done by respective Public Authorities
It probability a subordinate court from acting beyond its jurisdiction
It prevents usurpation of a public office