We know the concept of ochel nefesh regarding yom tov. And we know that you can do melacha that is directly related to food, (like frying an egg). My question is, why is שחיטה permitted if there's many steps involved in the preparation of the meat, such as skinning, salting, and rinsing the animal. While picking fruit is edible right when you pick it off the tree. So why is picking fruit forbidden?
Fruit will keep for several days so it can be picked before yom tov, but try keeping meat around in a hot environment, devoid of refrigeration or closed sewers for a day.
Great question! This is part of a major machlokes rishonim in maseches beitzah.
The Ran in the beginning of the 3rd chapter says that really all melachos are allowed on a Biblical level, but the sages forbade melachos that are generally done for a long time, as harvesting is generally done on an entire field, not just what you need for that meal. Therefore, even if you do it for just this meal, as in picking fruit, the sages forbade it. The Rosh says a similar point, but he phrases it as melachos that one generally is engaged in for a long time, i.e. you do it in bulk and it takes a significant part of the day.
Tosefos on 3a s.v. גזירה quotes the Yerushalmi which derives from the juxtaposition of the source of ochel nefesh, אך כל אשר תאכל לכל נפש to ושמרתם את המצות, that only the melachos from kneading and on (when being shomer the matzah begins) are included in the allowance of Ochel Nefesh.
Rashi seems to hold it is because it is something which could have been done from before Yom Tov, and even Ochel Nefesh is not allowed if you could have taken care of it before (the Rishonim dispute Rashi on this point).
The Ran cites the Ramban who holds that things which are too far removed from the actual eating are not allowed - only direct preparation is allowed. One point of his classification of this is things that are not in your domain, which prohibits hunting. His other example is harvesting/plucking fruit, which being still attached to the tree is seen as more of an act of taking it, not an act of preparing it, which means that something done to the food would be considered Ochel Nefesh, such as slaughtering or cooking, but something done to obtain the food would not be. (IIRC the Chasam Sofer in his commentary to the Yerushalmi seems to be saying this same idea, but his words are not entirely clear.)