Why would a fly be called a bee fly? Answer, because it mimics a bee. Now why would a fly want to mimic a bee? The mimicry of a bee would help it to protect itself from predators that avoids it after having learned that a bee can sting, giving it some form of passive protection, but I suppose if the encounter is with non experience predators the mimicry would not help, perhaps it is nature’s way of keeping the population of Bee flies in check. Just like we would not think twice smacking a fly to death with whatever is in hand but will hesitate and be more careful if it is a bee, in case you miss. Yes, I have been there and had learned my lesson too.
Technically referred to as Batesian mimicry, meaning something harmless is imitating something dangerous. Some flies may bite but they cannot sting like a bee, they have no stinger.
Although the mimicry is quite good in most cases and is difficult to tell the differences, when observed closer, bees have four wings while flies have only two. The next thing to observe is the antennae, bees have elbowed antennae and flies have short thin antennae which are hardly visible. Flying patterns are also different, flies hover and move erratically, bees move slowly and do not hover in the same place.
The photo taken is of a bee fly from the family Bombyliidae, no clue as to the specific genus though. I initially thought I was taking a photo of a bee, till I look closer.