Dear student,
Since the artery carries the blood from the hear to different part of the body, the pumping pressure of the heart when the blood moves upward and the gravity directing downwards does not allow the backflow of the blood.
But since the vein carries the blood against gravity the pressure of the blood cannot resist the backflow in the veins.
This, is the reason.
Regards