1,004. Carrying on Yom Tov

Shvisas Yom Tov 1:4

One is liable to the penalty of lashes for performing an act of labor on yom tov for which one would be liable on Shabbos unless it is necessary for food preparation. The exceptions to this rule are transferring items between domains and lighting a fire. Since it is permitted to transfer things for food preparation, it was permitted even when not needed for food preparation. For this reason, one may transfer a small child, a Torah, a key and similar things from one type of domain to another. Similarly, one is permitted to light a fire even it is not required for food preparation. As far as other kinds of labor, if they are needed for food preparation, like slaughtering, baking, kneading, etc., then they are permitted. If they are not needed for food preparation, like writing, weaving, building, etc., then they are prohibited.

Shvisas Yom Tov 1:5

If one is able to perform a labor on the day before yom tov without incurring a loss or having the results be inferior, then the Sages prohibited performing that labor on yom tov, even for food preparation. This was prohibited out of the concern that one might leave for yom tov labors that could have been performed beforehand, with the result that one will spend all day on yom tov performing those labors, which will keep him from enjoying the holiday.