In the middle ages, when soldiers captured archers, they cut off their first and second fingers - knowing they would no longer be able to pull back the draw string of their bows....
So, when archer defeated soldiers, they stuck up their middle fingers to taunt the opponents....
Also, because of the feather fletchings, arrows were called birds... And so, sticking up your middle finger was coined "flipping the bird"....
Bows at the same time were made from Yew trees... While 'flipping the bird', they would shout "Pluck Yew!"... leading to another common taunt...