Why are our bodies created to itch when histamine is released by our immune systems?
Scratching is getting potentially poisonous or at least irritant substances out and removes lodged insects like ticks.

Removing subcutane parasites like scapies mites is not feasible without scratching yourself bloody.

I don't see how "scratching them clearly doesn't help us survive".  Behaviors and skin reactions evolved way before our modern hygiene and parasite cures.