When you buy a 2nd hand car you have to pay a Gestoria to transfer the car and pay them the cost and tax and this is part of their service
Charges depend on thye age and value of the car but normally it costs a around €200
Also note that insurance is different in Spain and you insure the car not the individual drivers so that anubody over 25 can drive the car