Confusion in lineage as a reason behind prohibiting Zina

A: The prohibition of Zina is supported by evidence in the Qur'an, the Sunnah (whatever is reported from the Prophet) and Ijma` (consensus of scholars) whether the reason behind it is known, such as protecting lineage and preserving the honor of a woman and her Waliy (a legally accountable person acting for a woman regarding marriage), or is unknown. The basic ruling concerning Islamic laws is that they are obeyed whether the reason behind them is known or unknown. There are other reasons unknown to many people behind the prohibition of Zina and protecting lineage is only one of them. Even if we assume that it is the only reason, Zina cannot be considered permissible once the risk of pregnancy is eliminated. What Allah has forbidden will remain so and a Muslim is not permitted to commit it, regardless of the existence or nonexistence of what they believe to be the reason behind its prohibition. Allah (Glorified be He) is All-Wise and All-Knowing in His Ordinances to His servants and in His Decree. If Zina was permissible in some cases, Allah would show them, and your Lord is never forgetful. (Part No. 22; Page No. 22) May Allah grant us success. May peace and blessings be upon our Prophet Muhammad, his family, and Companions.