First, because between the 12 and 20% of the road accidents are due to mechanic problems of vehicles.
Periodic inspections: A part from the exeptions written in the norm, all the vehicles registered in Spain must go through a periodic inspection with the frequency stated in the official regulation and depending on the type and use of the vehicle.
REAL DECRETO 2822/1988 (GENERAL VEHICLE REGLAMENTATION). The 10th article states, Technical inspection of vehicles:
1. The registered vehicles must go through a technical inspection of vehicles at a inspection station authorized by the ministry of industry with the frequency, requirements and exceptions stated in the official regulations written in annex 1. The technical inspection, once checked the identification of the vehicle, will be about the conditions of the vehicle, road safety, environment protection, official registration, vehicle alterations and the validity of the certificates of transportation of dangerous and perishble goods.