Diagnostic testing has become very complex over the years.
Gone are the days that your mechanic could plug in , clear a code and you were on your way. The modern vehicle, in order to maintain efficiency and reliability has multiple control systems built in, all talking to each other in a 'can-bus' network. Emission control systems like Diesel Particulate Filter ( DPF) Catalytic Converter and Exhaust Gas Recirculation ( EGR ) keep it clean while more intricate fuel injection systems keep your petrol or diesel miles per gallon up. With Electric Hybrid are becoming more common, automotive diagnostics have jumped to another level again.
In a lot of cases, replacing the faulty part is not the end of the process. In many cases that part will need to be coded into the vehicle using dealer level equipment so the control unit is able to understand that the part has been replaced.