Maimonides Guide of the Perplexed (3, 48)
"People should be restrained and prevented from killing the two together in such a manner that the young is slain in the sight of the mother, for the pain of the animals under such circumstances is very great. There is no difference in this case between the pain of man and pain of other living beings, since the love and tenderness of the mother for her young ones is not produced by reasoning, but by imagination, and this faculty exists not only in man but in most living beings."
(כ) מֻתָּר לוֹמַר לְעַכּוּ''ם לַחְלֹב בְּהֶמְתּוֹ בְּשַׁבָּת מִשּׁוּם צַעַר בַּעֲלֵי חַיִּים שֶׁהֶחָלָב מְצַעֲרָהּ, וְהֶחָלָב אָסוּר בּוֹ בַּיּוֹם. וְיֵשׁ אוֹמְרִים שֶׁצָּרִיךְ לִקְנוֹתוֹ מִן הָעַכּוּ''ם בְּדָבָר מוּעָט, שֶׁלֹּא יְהֵא נִרְאֶה כְּחוֹלֵב לְצֹרֶךְ יִשְׂרָאֵל.
One can ask a gentile to milk his cow on Shabbat because of Tza'ar Ba'aley Hayyim, because the milk hurts her. But the milk is forbidden [to drink] on that same day. And there are those who saw that one needs to buy it for a smaller than normal amount from the gentile so that it does not appear that they milked in order to fulfill the needs of a Jew.
(יד) אָסוּר לוֹמַר לְכּוּתִי לְסָרֵס בְּהֵמָה שֶׁלָּנוּ. וְאִם לְקָחָהּ הוּא מֵעַצְמוֹ וְסֵרְסָהּ, מֻתָּר. וְאִם הֶעֱרִים יִשְׂרָאֵל בְּדָבָר זֶה, קוֹנְסִין אוֹתוֹ, וַאֲפִלּוּ לֹא הֶעֱרִים, וְהָגּוֹי מַכִּירוֹ וּמְכַוֵּן לְטוֹבָתוֹ, וּמוֹכְרָן לְיִשְׂרָאֵל אַחֵר, וַאֲפִלּוּ לִבְנוֹ גָּדוֹל מֻתָּר לְמָכְרָהּ, אֲבָל לִבְנוֹ קָטָן אֵינָהּ מוֹכְרָהּ וְלֹא נוֹתְנָהּ לוֹ. הַגָּה: וּמֻתָּר לָתֵת בְּהֵמָה לְגּוֹי לְמַחֲצִית שָׂכָר, אַף עַל פִּי שֶׁהַכּוּתִי בְּוַדַּאי יְסָרְסֶנּוּ (הַגָּהוֹת מַיְמוֹנִי פט''ז מֵהִלְכוֹת א''ב), דְּגוֹי אַדַּעְתָּא דְּנַפְשֵׁהּ קָא עָבִיד (בֵּית יוֹסֵף). וּמֻתָּר לִמְכֹּר לְכוּתִים בְּהֵמוֹת וְתַרְנְגוֹלִים, אַף עַל גַּב דִּבְוַדַּאי הַכּוּתִי קוֹנֶה אוֹתָם לְסָרְסָם. (וְיֵשׁ אוֹסְרִים תִּמְצָא מְבֹאָר בִּתְרוּמַת הַדֶּשֶׁן סִי' רצ''ד) וּמִיהוּ, אִם אֵין הַכּוּתִי הַקּוֹנֶה מְסָרְסָם בְּעַצְמוֹ, רַק נוֹתְנוֹ לְכוּתִי אַחֵר לְסָרֵס, לְכֻלֵּי עָלְמָא שָׁרֵי (ג''ז שָׁם). כָּל דָּבָר הַצָּרִיךְ לִרְפוּאָה אוֹ לִשְׁאָר דְּבָרִים, לֵית בֵּהּ מִשּׁוּם אִסוּר צַעַר בַּעֲלֵי חַיִּים (אִסוּר וְהֶתֵּר הָאָרֹךְ סִימָן נ''ט). וְלָכֵן מֻתָּר לִמְרֹט נוֹצוֹת מֵאֲוָזוֹת חַיּוֹת, וְלֵיכָּא לְמֵיחַשׁ מִשּׁוּם צַעַר בַּעֲלֵי חַיִּים (מהרא''י סִי' ק''ה). וּמִכָּל מָקוֹם הָעוֹלָם נִמְנָעִים דְּהָוֵי אַכְזָרִיּוּת:
Any [action] needed for healing or other reasons, there is no prohibition of "causing pain to animals" (Issur V'Heter Extended 59). And therefore it is permitted to pluck the feathers of wild geese, and there is no potential problem of "causing pain to animals" (Mahar"i 105). Nevertheless, the world withholds from it because of its cruelty.