I do not know whether the Messenger of Allah ﷺ forbade it because the donkeys were the people's means of transport and he disliked that their transport be lost, or whether he prohibited the meat of domestic donkeys on the day of Khaybar.
حدثني محمد بن أبي الحسين حدثنا عمر بن حفص حدثنا أبي عن عاصم عن عامر
لا أدري أنهى عنه رسول الله ﷺ من أجل أنه كان حمولة الناس فكره أن تذهب حمولتهم أو حرمه في يوم خيبر لحم الحمر الأهلية