As this question notes, the law concerning cooking a young goat in its mother's milk appears three times in Torah: Exodus: 23:19, Exodus 34:26, and Deuteronomy 14:21. It's placement in Deuteronomy fits somewhat with the preceding laws: do eat this, do not eat this, etc... - laws that all deal with diet.
However, its placement in the two passages in Exodus strikes me as unusual. In both cases it comes in sections dealing with the annual festivals. In Exodus 23:14-19, the law appears to be part of the instructions particular to the Festival of Ingathering (though perhaps not). While in Exodus 34, the instructions seem more applicable to festivals and sabbaths in general.
Why is this law specifically included in these two sections dealing with festivals?