Upon giving yourself Leather horse armor with proper components the player is unable to eat it regardless if they should be able to.
To recreate in game run these commands
/give @p leather_horse_armor[food =
{nutrition:4,saturation:6,can_always_eat:true,eat_seconds:2}
] 1
Notice how you cannot eat this item, however if you replace the item with stone for example
/give @p stone[food=
{nutrition:4,saturation:6,can_always_eat:true,eat_seconds:2}
] 1
This command will properly produce an item that can be consumed despite no component changes
{EDIT] the horse armor command sometimes has an arbitrary \ before the equal sign for a reason beyond me as i cannot remove it no matter what i try due to it being a bug on the site itself. Please remove the \ before testing in game
Thank you for your report!
We're tracking this issue as MC-269638, so this ticket is being resolved and linked as a duplicate.
That ticket has already been resolved as Won't Fix, which means this is considered a bug but won't be fixed. The description of that ticket or the comments might explain the rationale. Please do not leave a comment on the linked ticket.
If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.
Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki