Why did humans evolved the scratch reflex?
With about 20 square feet of skin constantly exposed to potential irritation, itching must serve an important protective/defensive function. 

The "scratch reflex" (I'm not sure I would call it that) is necessary to life and limb. Itch is a major somatic sensation, along with (and different from) pain, temperature, and touch. Itch can be an acute sensation, e.g. a mosquito bite, or a chronic condition (peripheral or internal disease). 

Research on itch signaling is still at its infancy, and basic mechanisms by which the itch sensation is transmitted and regulated have yet to be fully understood. It is meant to give us information about how we are interacting with our environment. Loss of such fine sensation, such as occurs with Hansen's Disease - aka leprosy, where patches of skin become painless and do not itch, so are ignored by the patient - leads to festering wounds and resultant problems. 

As @MattDMo stated in a comment, sensation allows us to respond appropriately to irritants which, if ignored, might lead to festering wounds: thorns and other foreign bodies, sucking or biting insects (parasites or other, which can act as disease vectors as well), etc. It allows us to learn how to avoid and treat such irritants.

Various types of itch can be classified by the origin of the itch, which could be skin-related, neuropathic, systemic, or psychogenic. The most common cause of itching is dry skin; tiny cracks in the skin cause an inflammatory response, which (within reason) is not a problem in and of itself. The response to the itch, though, can be beneficial or damaging. One can treat dry skin, wash off irritants, treat infections, avoid causes, etc. 

Scratching can be benign if done sensibly, or it can injure the skin, allowing infection, etc. However, the benefit of having such sensation under normal circumstances certainly outweighs the inconvenience.

That is not to say that pathological conditions that cause itching are not problematic. They are, and one might reasonably curse the sensation under those circumstances.

Edited to add: Itching, or pruritus, is defined as an unpleasant cutaneous sensation that serves as a physiological self-protective mechanism to prevent the body from being hurt by harmful external agents. (Nature, 2007) 

Scratching is simply a reasonable response to itching from any source and is not necessarily harmful. It's not a reflex per se. You can avoid scratching. Some animals must actively seek out a way to scratch. This takes it well outside of the terminology of reflex as neurologically understood.

Itch Signaling in the Nervous System
Pruritus
When you have an itch, what is happening under your skin?