くれる usually means that the giver is not on the first person's side and the receiver is on the first person's side. Why is it used in くれてやる, where the giver is the first person and the receiver is not first person?
1 Answer
Looking up くれる in the dictionary leads to this second definition (which I have never heard in modern Japanese except for the form くれてやる):
2 自分が相手にものを与える。また、相手に対してある行為をしたり、加えたりする。相手を与え手より低い者として卑しめる気持ちを込めた言い方で、「くれてやる」の形になることも多い。「鳥にえさを―・れる」「盆栽に水を―・れる」「平手打ちを―・れてやる」
So, basically, くれる by itself can mean to give something to someone else in the first person. Also, as you already know, やる can mean to give something. What this implies is that by using くれてやる you are effectively saying give "twice" (二重) which emphasizes that act of giving (and of course implies 上から目線/恩着せがましい meaning). This is the reason why there is the form くれてやる.