If you want the truth , it is to raise money for the State. There are other bullshit reasons, but the money issue is the one.
I kind of like everyone needing to know the laws of the road. Otherwise, who is to say you have to stop at a red light? Inspections, especially the emissions, now that is where the laws should be minimized. Breaks, tires, windshield wipers, lights. Period.