The main purpose of this legislation, known as the "Know Your Rights Act," is to improve the treatment of individuals who are detained in the immigration system. It aims to ensure that these individuals are better informed about their legal rights and the procedures they face, which can lead to more efficient immigration proceedings. Key provisions of the Act include the establishment of an Office of Legal Access Programs within the Executive Office for Immigration Review.