They fly was incredible symbolism.
Obviously there's the whole "They can't even hurt a fly."
And throughout the episode we see the AI show no reaction to a fly landing on them.
Why not? They are programmed not to hurt a living thing, there's nothing they can do about the situation.
But there's more to it than that.
We see the fly land on the sheriff and it malfunctions, in front of a couple guests.
The development team investigates for hours but they can't figure out the "BUG" that caused the issue.
Why did the sheriff malfunction at that point in time? It was going through an internal struggle to swat the fly, to kill a living creature.
A fly landing on a person is such a small event that went completely unnoticed to the guests and investigators, but it is a blaring signal to the audience that the AI is fighting against its programming.
Then there is the wonderful interview between Dolores and the security guard.
He straight up asks her "Would you hurt a living creature?" And she responds "No".
And in the next scene we see her casually, and instinctually, kill the fly.
The symbolism is that no matter how closely monitored the robots are, humans aren't able to catch the small signs that the AI is evolving against its programming.