Ocelots that already existed in worlds that have been transferred to Minecraft Bedrock Edition from Legacy Console Edition using the "Sync Old Worlds" feature cannot have their trust gained. I have tested gaining the trust of an Ocelot in a brand new world, and it worked without issue. This bug is only present in worlds transferred to Bedrock Edition from a Legacy Console Edition of Minecraft.
Attachments
Comments 3

Are these tamed ocelots?
If not, this issue may be due the the minecraft:trusting component only existing in the minecraft:ocelot_wild component group, which is only added by the minecraft:entity_spawned event. When the mobs are updated from console edition they may only get the base components of their Bedrock type.
Cleaning up old tickets: This ticket had been set to 'Awaiting Response', but has not received a response from the reporter (~3 months+) so is being closed as Incomplete. If you feel this is still a valid issue then please comment, or create a new ticket following the Issue Guidelines which includes steps to reproduce the problem.
Quick Links:
📓 Issue Guidelines – 💬 Mojang Support – 📧 Suggestions – 📖 Minecraft Wiki