The main purpose of this legislation, known as the Fundamental Immigration Fairness Act, is to limit the power of the Secretary of Homeland Security regarding the detention of immigrants who are considered to have good moral character. The goal is to create a fairer immigration process and protect individuals who meet certain ethical standards from being detained without just cause.