 Hannah and her sons acted in this way when it came to eating pork for the sake of desecrating the Torah; by allowing themselves to be killed, they sanctified God's name in public.The exception for certain types of sexual immorality is extrapolated from Deuteronomy 22