Rav Yehuda said in the name of Rav: Everything that the Holy One, blessed be He, created in His world, He created male and female. Even the Leviathan the slant serpent and the Leviathan the tortuous serpent He created male and female; and had they mated with one another, they would have destroyed the entire world. What did the Holy One, blessed be He, do? He castrated the male and killed the female and salted it for the righteous in the time to come, as it is said: "And He shall slay the dragon that is in the sea" (Isaiah 27:1). And the behemoth on the thousand mountains too He created male and female; and had they mated with one another, they would have destroyed the entire world. What did the Holy One, blessed be He, do? He castrated the male and cooled the female and preserved it for the righteous in the time to come, as it is said: "Behold now, his strength is in his loins" (Job 40:16), this is the male, "and his force is in the muscles of his belly," this is the female.
The Messianic Banquet
Bava Batra 74b-75a
אָמַר רַב יְהוּדָה אָמַר רַב: כֹּל מַה שֶּׁבָּרָא הַקָּדוֹשׁ בָּרוּךְ הוּא בְּעוֹלָמוֹ — זָכָר וּנְקֵבָה בְּרָאָם. אַף לִוְיָתָן נָחָשׁ בָּרִיחַ וְלִוְיָתָן נָחָשׁ עֲקַלָּתוֹן — זָכָר וּנְקֵבָה בְּרָאָם, וְאִלְמָלֵי נִזְקָקִין זֶה לָזֶה — מַחְרִיבִין כָּל הָעוֹלָם כּוּלּוֹ. מָה עָשָׂה הַקָּדוֹשׁ בָּרוּךְ הוּא? סֵירַס אֶת הַזָּכָר, וְהָרַג הַנְּקֵבָה וּמְלָחָהּ לַצַּדִּיקִים לֶעָתִיד לָבֹא, שֶׁנֶּאֱמַר: ״וְהָרַג אֶת הַתַּנִּין אֲשֶׁר בַּיָּם״. וְאַף בְּהֵמוֹת בְּהַרְרֵי אֶלֶף — זָכָר וּנְקֵבָה בְּרָאָם, וְאִלְמָלֵי נִזְקָקִין זֶה לָזֶה מַחֲרִיבִין כָּל הָעוֹלָם כּוּלּוֹ. מָה עָשָׂה הַקָּדוֹשׁ בָּרוּךְ הוּא? סֵירַס הַזָּכָר, וְצִינֵּן הַנְּקֵבָה וּשְׁמָרָהּ לַצַּדִּיקִים לֶעָתִיד לָבֹא, שֶׁנֶּאֱמַר: ״הִנֵּה נָא כֹחוֹ בְמׇתְנָיו״ — זֶה זָכָר, ״וְאוֹנוֹ בִּשְׁרִירֵי בִטְנוֹ״ — זוֹ נְקֵבָה.