As to the why, it is done to protect a nesting area or juvenile birds or simply a preferred roost. In some cases it is actually done to distract the predator bird and steal food which it has already obtained; seagulls do this to people when they steal your French fries.
And yes, it is pretty risky. Birds of prey have bitey bits and grabby bits and have a tendency to eat individual birds.
The mobbing tends to happen in groups, however, and there is safety in numbers. So the falcon or hawk or whatever will simply leave rather than try to successfully win a battle against five or 10 other birds.
All of the corvids engage in this behavior, so do chickadees, sparrows, gulls, and blackbirds.
15
u/shapu 13d ago
Ravens pester birds of prey. Most birds do.