OMG ....that must have been terrible - for your friend, and you too. These things happen - we cannot predict what our animals will do, even the most "bombproof". What happened was not your fault, and any one who rides, will be fully aware of the risks we take.
Hope your friend makes a good recovery, and you are not feeling too bruised after your close encounter with an ambulance.......at least you had the paramedics on hand.
I know a couple of people who have had accidents on their land with horses - then trying to get other livestock away from the area because of the air ambulance landing,only to end up being injured like you, whilst doing it.