Doesn't look good to me. Looks like some sort of injury or irritation and looks infected. All I can tell is there is swelling and blood. Anything bloody with meat hanging out you'd want to get looked at by a vet.
Cause? I'd be looking at its habitat. Is it clean?