It is issued by the court to enquire into the legality of claim of a person to a public office. Hence, it prevents illegal usurpation of public office by a person.